Esempio n. 1
0
 def project_curve(self, other):
     # this way Geom_Circle and alike are valid too
     if (isinstance(other, TopoDS_Edge) or isinstance(other, Geom_Curve)
             or issubclass(other, Geom_Curve)):
         # convert edge to curve
         first, last = topexp.FirstVertex(other), topexp.LastVertex(other)
         lbound, ubound = BRep_Tool().Parameter(
             first, other), BRep_Tool().Parameter(last, other)
         other = BRep_Tool.Curve(other, lbound, ubound).GetObject()
         return geomprojlib.Project(other, self.surface_handle)
Esempio n. 2
0
 def get_curve(self):
     return BRep_Tool.Curve(self)