Пример #1
0
    def copy(self):
        """

        :return:
        """
        cp = BRepBuilderAPI_Copy(self)
        cp.Perform(self)
        # get the class, construct a new instance
        # cast the cp.Shape() to its specific TopoDS topology
        _copy = self.__class__(shape_lut(cp.Shape()))
        return _copy
Пример #2
0
    def copy(self, geom=True):
        """
        Copy this shape.

        :param bool geom: Option to copy geometry.

        :return: The copied shape.
        :rtype: afem.topology.entities.Shape
        """
        return Shape.wrap(BRepBuilderAPI_Copy(self.object, geom).Shape())
Пример #3
0
    def copy_shape(shape, copy_geom=True):
        """
        Copy a shape.

        :param OCCT.TopoDS.TopoDS_Shape shape: The shape,
        :param bool copy_geom: Option to copy geometry.

        :return: The copied shape.
        :rtype: OCCT.TopoDS.TopoDS_Shape
        """
        return BRepBuilderAPI_Copy(shape, copy_geom).Shape()