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 update_shape(self, change=None):
     d = self.declaration
     child = self.get_first_child()
     if hasattr(child, 'curve'):
         curve = child.curve
     else:
         curve = BRep_Tool.Curve_(child.shape, 0, 1)[0]
     trimmed_curve = self.curve = Geom_TrimmedCurve(curve, d.u, d.v)
     self.shape = self.make_edge(trimmed_curve)
Ejemplo n.º 3
0
    def curve_of_edge(edge):
        """
        Get the curve of the edge.

        :param OCCT.TopoDS.TopoDS_Edge edge: The edge.

        :return: Underlying curve of edge.
        :rtype: OCCT.Geom.Geom_Curve
        """
        return BRep_Tool.Curve_(edge, 0., 0.)