Exemple #1
0
    def face(self):
        """
        Get the face the point is on.

        :return: The face.
        :rtype: afem.topology.entities.Face
        """
        return Face(self._tool.Face())
Exemple #2
0
    def has_ancestor_face2(self, edge):
        """
        Get the ancestor face on the intersection edge on the second shape
        if available.

        :param afem.topology.entities.Edge edge: The edge.

        :return: *True* and the face if available, *False* and *None* if not.
        :rtype: tuple(bool, afem.topology.entities.Face or None)
        """
        f = TopoDS_Face()
        if self._bop.HasAncestorFaceOn2(edge.object, f):
            return True, Face(f)
        return False, None
Exemple #3
0
 def __init__(self, face, v):
     v = CheckGeom.to_vector(v)
     builder = BRepPrimAPI_MakePrism(face.object, v)
     self._solid = Solid(builder.Shape())
     self._f1 = Face(builder.FirstShape())
     self._f2 = Face(builder.LastShape())
Exemple #4
0
 def __init__(self, edge, v):
     v = CheckGeom.to_vector(v)
     builder = BRepPrimAPI_MakePrism(edge.object, v)
     self._f = Face(builder.Shape())
     self._e1 = Edge(builder.FirstShape())
     self._e2 = Edge(builder.LastShape())
Exemple #5
0
 def __init__(self, wire):
     if isinstance(wire, Curve):
         wire = Wire.by_curve(wire)
     elif isinstance(wire, Edge):
         wire = Wire.by_edge(wire)
     self._f = Face(BRepBuilderAPI_MakeFace(wire.object, True).Face())
Exemple #6
0
 def __init__(self, pln, umin, umax, vmin, vmax):
     builder = BRepBuilderAPI_MakeFace(pln.gp_pln, umin, umax, vmin, vmax)
     self._f = Face(builder.Face())
Exemple #7
0
 def __init__(self, srf, tol=1.0e-7):
     self._f = Face(BRepBuilderAPI_MakeFace(srf.object, tol).Face())
Exemple #8
0
 def face(self):
     """
     :return: The sphere as a face.
     :rtype: afem.topology.entities.Face
     """
     return Face(self._builder.Face())
Exemple #9
0
 def face(self):
     """
     :return: The lateral face of the cylinder
     :rtype: afem.topology.entities.Face
     """
     return Face(self._builder.Face())
Exemple #10
0
 def top_face(self):
     """
     :return: The top face.
     :rtype: afem.topology.entities.Face
     """
     return Face(self._builder.TopFace())
Exemple #11
0
 def right_face(self):
     """
     :return: The right face.
     :rtype: afem.topology.entities.Face
     """
     return Face(self._builder.RightFace())
Exemple #12
0
 def left_face(self):
     """
     :return: The left face.
     :rtype: afem.topology.entities.Face
     """
     return Face(self._builder.LeftFace())
Exemple #13
0
 def front_face(self):
     """
     :return: The front face.
     :rtype: afem.topology.entities.Face
     """
     return Face(self._builder.FrontFace())
Exemple #14
0
 def back_face(self):
     """
     :return: The back face.
     :rtype: afem.topology.entities.Face
     """
     return Face(self._builder.BackFace())
Exemple #15
0
 def bottom_face(self):
     """
     :return: The bottom face.
     :rtype: afem.topology.entities.Face
     """
     return Face(self._builder.BottomFace())