Пример #1
0
 def convert_circ_to_geomCirc(self, circ):
     """Convert 2d circle ((cx, cy), r) to type <Geom_Circle>"""
     (cx, cy), rad = circ
     cntrPt = gp_Pnt(cx, cy, 0)
     ax2 = gp_Ax2(cntrPt, gp_Dir(0, 0, 1))
     geomCirc = Geom_Circle(ax2, rad)
     geomCirc.Transform(self.Trsf)
     return geomCirc
Пример #2
0
 def circ(self, cntr, rad, constr=False):
     """Create a construction circle """
     cx, cy = cntr
     cntrPt = gp_Pnt(cx, cy, 0)
     ax2 = gp_Ax2(cntrPt, gp_Dir(0, 0, 1))
     geomCirc = Geom_Circle(ax2, rad)
     geomCirc.Transform(self.Trsf)
     if constr:
         self.ccircList.append(geomCirc)
     else:
         edge = BRepBuilderAPI_MakeEdge(Geom_Curve(geomCirc))
         self.wire = BRepBuilderAPI_MakeWire(edge.Edge()).Wire()
         self.wireList.append(self.wire)