OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    BRepBuilderAPI_Transform Class Reference

    Geometric transformation on a shape. The transformation to be applied is defined as a gp_Trsf transformation, i.e. a transformation which does not modify the underlying geometry of shapes. The transformation is applied to: More...

    #include <BRepBuilderAPI_Transform.hxx>

    Inheritance diagram for BRepBuilderAPI_Transform:

    Public Member Functions

     BRepBuilderAPI_Transform (const gp_Trsf &T)
     Constructs a framework for applying the geometric transformation T to a shape. Use the function Perform to define the shape to transform.
     BRepBuilderAPI_Transform (const TopoDS_Shape &theShape, const gp_Trsf &theTrsf, const bool theCopyGeom=false, const bool theCopyMesh=false)
     Creates a transformation from the gp_Trsf <theTrsf>, and applies it to the shape <theShape>. If the transformation is direct and isometric (determinant = 1) and <theCopyGeom> = false, the resulting shape is <theShape> on which a new location has been set. Otherwise, the transformation is applied on a duplication of <theShape>. If <theCopyMesh> is true, the triangulation will be copied, and the copy will be assigned to the result shape.
    void Perform (const TopoDS_Shape &theShape, const bool theCopyGeom=false, const bool theCopyMesh=false)
     Applies the geometric transformation defined at the time of construction of this framework to the shape S.
    TopoDS_Shape ModifiedShape (const TopoDS_Shape &S) const override
     Returns the modified shape corresponding to .
    const NCollection_List< TopoDS_Shape > & Modified (const TopoDS_Shape &S) override
     Returns the list of shapes modified from the shape .
    Public Member Functions inherited from BRepBuilderAPI_MakeShape
    virtual void Build (const Message_ProgressRange &theRange=Message_ProgressRange())
     This is called by Shape(). It does nothing but may be redefined.
    virtual const TopoDS_Shape & Shape ()
     Returns a shape built by the shape construction algorithm. Raises exception StdFail_NotDone if the shape was not built.
     operator TopoDS_Shape ()
    virtual const NCollection_List< TopoDS_Shape > & Generated (const TopoDS_Shape &S)
     Returns the list of shapes generated from the shape .
    virtual bool IsDeleted (const TopoDS_Shape &S)
     Returns true if the shape S has been deleted.
    Public Member Functions inherited from BRepBuilderAPI_Command
    virtual ~BRepBuilderAPI_Command ()
    virtual bool IsDone () const
    void Check () const
     Raises NotDone if done is false.

    Additional Inherited Members

    Protected Member Functions inherited from BRepBuilderAPI_ModifyShape
     BRepBuilderAPI_ModifyShape ()
     Empty constructor.
     BRepBuilderAPI_ModifyShape (const TopoDS_Shape &S)
     Initializes the modifier with the Shape , and set the field <myInitialShape> to .
     BRepBuilderAPI_ModifyShape (const occ::handle< BRepTools_Modification > &M)
     Set the field <myModification> with <M>.
     BRepBuilderAPI_ModifyShape (const TopoDS_Shape &S, const occ::handle< BRepTools_Modification > &M)
     Initializes the modifier with the Shape , and set the field <myInitialShape> to , and set the field <myModification> with <M>, the performs the modification.
    void DoModif (const TopoDS_Shape &S)
     Performs the previously given modification on the shape .
    void DoModif (const occ::handle< BRepTools_Modification > &M)
     Performs the modification <M> on a previously given shape.
    void DoModif (const TopoDS_Shape &S, const occ::handle< BRepTools_Modification > &M)
     Performs the modification <M> on the shape .
    Protected Member Functions inherited from BRepBuilderAPI_MakeShape
     BRepBuilderAPI_MakeShape ()
    Protected Member Functions inherited from BRepBuilderAPI_Command
     BRepBuilderAPI_Command ()
     Set done to False.
    void Done ()
     Set done to true.
    void NotDone ()
     Set done to false.
    Protected Attributes inherited from BRepBuilderAPI_ModifyShape
    BRepTools_Modifier myModifier
    TopoDS_Shape myInitialShape
    occ::handle< BRepTools_Modification > myModification
    Protected Attributes inherited from BRepBuilderAPI_MakeShape
    TopoDS_Shape myShape
    NCollection_List< TopoDS_Shape > myGenerated

    Detailed Description

    Geometric transformation on a shape. The transformation to be applied is defined as a gp_Trsf transformation, i.e. a transformation which does not modify the underlying geometry of shapes. The transformation is applied to:

    • all curves which support edges of a shape, and
    • all surfaces which support its faces. A Transform object provides a framework for:
    • defining the geometric transformation to be applied,
    • implementing the transformation algorithm, and
    • consulting the results.

    Constructor & Destructor Documentation

    ◆ BRepBuilderAPI_Transform() [1/2]

    BRepBuilderAPI_Transform::BRepBuilderAPI_Transform ( const gp_Trsf & T)

    Constructs a framework for applying the geometric transformation T to a shape. Use the function Perform to define the shape to transform.

    ◆ BRepBuilderAPI_Transform() [2/2]

    BRepBuilderAPI_Transform::BRepBuilderAPI_Transform ( const TopoDS_Shape & theShape,
    const gp_Trsf & theTrsf,
    const bool theCopyGeom = false,
    const bool theCopyMesh = false )

    Creates a transformation from the gp_Trsf <theTrsf>, and applies it to the shape <theShape>. If the transformation is direct and isometric (determinant = 1) and <theCopyGeom> = false, the resulting shape is <theShape> on which a new location has been set. Otherwise, the transformation is applied on a duplication of <theShape>. If <theCopyMesh> is true, the triangulation will be copied, and the copy will be assigned to the result shape.

    Member Function Documentation

    ◆ Modified()

    const NCollection_List< TopoDS_Shape > & BRepBuilderAPI_Transform::Modified ( const TopoDS_Shape & S)
    overridevirtual

    Returns the list of shapes modified from the shape .

    Reimplemented from BRepBuilderAPI_ModifyShape.

    ◆ ModifiedShape()

    TopoDS_Shape BRepBuilderAPI_Transform::ModifiedShape ( const TopoDS_Shape & S) const
    overridevirtual

    Returns the modified shape corresponding to .

    Reimplemented from BRepBuilderAPI_ModifyShape.

    ◆ Perform()

    void BRepBuilderAPI_Transform::Perform ( const TopoDS_Shape & theShape,
    const bool theCopyGeom = false,
    const bool theCopyMesh = false )

    Applies the geometric transformation defined at the time of construction of this framework to the shape S.

    • If the transformation T is direct and isometric, in other words, if the determinant of the vectorial part of T is equal to 1., and if theCopyGeom equals false (the default value), the resulting shape is the same as the original but with a new location assigned to it.
    • In all other cases, the transformation is applied to a duplicate of theShape.
    • If theCopyMesh is true, the triangulation will be copied, and the copy will be assigned to the result shape. Use the function Shape to access the result. Note: this framework can be reused to apply the same geometric transformation to other shapes. You only need to specify them by calling the function Perform again.

    The documentation for this class was generated from the following file: