Ejemplo n.º 1
0
def make_edge(*args):
    """ (gp_Pnt, gp_Pnt) """
    edge = BRepBuilderAPI_MakeEdge(*args)
    with assert_isdone(edge, 'failed to produce edge'):
        result = edge.Edge()
        edge.Delete()
        return result
Ejemplo n.º 2
0
def make_edge(*args):
    edge = BRepBuilderAPI_MakeEdge(*args)
    result = edge.Edge()
    edge.Delete()
    return result
Ejemplo n.º 3
0
    def create(cls, *args):
        """
        https://www.opencascade.com/doc/occt-7.3.0/refman/html/class_b_rep_builder_a_p_i___make_edge.html
        :type V1: TopoDS_Vertex &
        :type V2: TopoDS_Vertex &

        :type P1: gp_Pnt
        :type P2: gp_Pnt

        :type L: gp_Lin
        :type p1: (Optional) float or gp_Pnt or TopoDS_Vertex
        :type p2: (Optional) float or gp_Pnt or TopoDS_Vertex

        :type L: gp_Circ
        :type p1: (Optional) float or gp_Pnt or TopoDS_Vertex
        :type p2: (Optional) float or gp_Pnt or TopoDS_Vertex

        :type L: gp_Elips
        :type p1: (Optional) float or gp_Pnt or TopoDS_Vertex
        :type p2: (Optional) float or gp_Pnt or TopoDS_Vertex

        :type L: gp_Hypr
        :type p1: (Optional) float or gp_Pnt or TopoDS_Vertex
        :type p2: (Optional) float or gp_Pnt or TopoDS_Vertex

        :type L: gp_Parab
        :type p1: (Optional) float or gp_Pnt or TopoDS_Vertex
        :type p2: (Optional) float or gp_Pnt or TopoDS_Vertex

        :type L: Handle_Geom_Curve &
        :type p1: (Optional) float or gp_Pnt or TopoDS_Vertex
        :type p2: (Optional) float or gp_Pnt or TopoDS_Vertex

        :type L: Handle_Geom_Curve &
        :type p1: (Optional) gp_Pnt or TopoDS_Vertex
        :type p2: (Optional) gp_Pnt or TopoDS_Vertex
        :type p1: (Optional) float
        :type p2: (Optional) float

        :type L: Handle_Geom2d_Curve &
        :type S: Handle_Geom_Surface &
        :type p1: (Optional) float or gp_Pnt or TopoDS_Vertex
        :type p2: (Optional) float or gp_Pnt or TopoDS_Vertex

        :type L: Handle_Geom2d_Curve
        :type S: Handle_Geom_Surface &
        :type P1: (Optional) gp_Pnt or TopoDS_Vertex
        :type P2: (Optional) gp_Pnt or TopoDS_Vertex
        :type p1: (Optional) float
        :type p2: (Optional) float

        * The general method to directly create an edge is to give -
        a 3D curve C as the support (geometric domain) of the edge, -
        two vertices V1 and V2 to limit the curve
        (definition of the restriction of the edge),
        and - two real values p1 and p2 which are the
        parameters for the vertices V1 and V2 on the curve.
        The curve may be defined as a 2d curve in the parametric
        space of a surface: a pcurve.
        The surface on which the edge is built is then kept at the level
        of the edge.
        The default tolerance will be associated with this edge.
        """
        edge = BRepBuilderAPI_MakeEdge(*args)
        with assert_isdone(edge, 'failed to produce edge'):
            result = edge.Edge()
            edge.Delete()
            return result