Ejemplo n.º 1
0
 def curve(self):
     """
     :return: The underlying curve of the edge.
     :rtype: afem.geometry.entities.Curve
     """
     geom_curve, _, _ = BRep_Tool.Curve_(self.object, 0., 0.)
     return Curve.wrap(geom_curve)
Ejemplo n.º 2
0
 def curve(self):
     """
     :return: The curve formed by concatenating all the underlying curves
         of the edges.
     :rtype: afem.geometry.entities.NurbsCurve
     """
     geom_convert = GeomConvert_CompCurveToBSplineCurve()
     exp = BRepTools_WireExplorer(self.object)
     tol = self.tol_max
     while exp.More():
         e = TopoDS.Edge_(exp.Current())
         exp.Next()
         adp_crv = BRepAdaptor_Curve(e)
         geom_convert.Add(adp_crv.BSpline(), tol)
     geom_curve = geom_convert.BSplineCurve()
     return Curve.wrap(geom_curve)