| 2616 | |
| 2617 | @classmethod |
| 2618 | def makeCircle( |
| 2619 | cls, |
| 2620 | radius: float, |
| 2621 | pnt: VectorLike = Vector(0, 0, 0), |
| 2622 | dir: VectorLike = Vector(0, 0, 1), |
| 2623 | angle1: float = 360.0, |
| 2624 | angle2: float = 360, |
| 2625 | orientation: bool = True, |
| 2626 | ) -> Edge: |
| 2627 | pnt = Vector(pnt) |
| 2628 | dir = Vector(dir) |
| 2629 | |
| 2630 | circle_gp = gp_Circ(gp_Ax2(pnt.toPnt(), dir.toDir()), radius) |
| 2631 | |
| 2632 | if angle1 == angle2: # full circle case |
| 2633 | return cls(BRepBuilderAPI_MakeEdge(circle_gp).Edge()) |
| 2634 | else: # arc case |
| 2635 | circle_geom = GC_MakeArcOfCircle( |
| 2636 | circle_gp, radians(angle1), radians(angle2), orientation |
| 2637 | ).Value() |
| 2638 | return cls(BRepBuilderAPI_MakeEdge(circle_geom).Edge()) |
| 2639 | |
| 2640 | @classmethod |
| 2641 | def makeEllipse( |