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_GTransform Class Reference

    Geometric transformation on a shape. The transformation to be applied is defined as a gp_GTrsf transformation. It may be: More...

    #include <BRepBuilderAPI_GTransform.hxx>

    Inheritance diagram for BRepBuilderAPI_GTransform:

    Public Member Functions

     BRepBuilderAPI_GTransform (const gp_GTrsf &T)
     Constructs a framework for applying the geometric transformation T to a shape. Use the function Perform to define the shape to transform.
     BRepBuilderAPI_GTransform (const TopoDS_Shape &S, const gp_GTrsf &T, const bool Copy=false)
     Constructs a framework for applying the geometric transformation T to a shape, and applies it to the shape S.
    void Perform (const TopoDS_Shape &S, const bool Copy=false)
     Applies the geometric transformation defined at the time of construction of this framework to the shape S.
    const NCollection_List< TopoDS_Shape > & Modified (const TopoDS_Shape &S) override
     Returns the list of shapes modified from the shape .
    TopoDS_Shape ModifiedShape (const TopoDS_Shape &S) const override
     Returns the modified shape corresponding to .
    Public Member Functions inherited from BRepBuilderAPI_ModifyShape
    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_GTrsf transformation. It may be:

    • a transformation equivalent to a gp_Trsf transformation, the most common case: you should , however, use a BRepAPI_Transform object to perform this kind of transformation; or
    • an affinity, or
    • more generally, any type of point transformation which may be defined by a three row, four column matrix of transformation. In the last two cases, the underlying geometry of the following shapes may change:
    • a curve which supports an edge of the shape, or
    • a surface which supports a face of the shape; For example, a circle may be transformed into an ellipse when applying an affinity transformation. The transformation is applied to:
    • all the curves which support edges of the shape, and
    • all the surfaces which support faces of the shape. A GTransform object provides a framework for:
    • defining the geometric transformation to be applied,
    • implementing the transformation algorithm, and
    • consulting the result.

    Constructor & Destructor Documentation

    ◆ BRepBuilderAPI_GTransform() [1/2]

    BRepBuilderAPI_GTransform::BRepBuilderAPI_GTransform ( const gp_GTrsf & T)

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

    ◆ BRepBuilderAPI_GTransform() [2/2]

    BRepBuilderAPI_GTransform::BRepBuilderAPI_GTransform ( const TopoDS_Shape & S,
    const gp_GTrsf & T,
    const bool Copy = false )

    Constructs a framework for applying the geometric transformation T to a shape, and applies it to the shape S.

    • If the transformation T is direct and isometric (i.e. if the determinant of the vectorial part of T is equal to 1.), and if Copy equals false (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 S. Use the function Shape to access the result. Note: the constructed framework can be reused to apply the same geometric transformation to other shapes: just specify them with the function Perform.

    Member Function Documentation

    ◆ Modified()

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

    Returns the list of shapes modified from the shape .

    Reimplemented from BRepBuilderAPI_MakeShape.

    ◆ ModifiedShape()

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

    Returns the modified shape corresponding to .

    Reimplemented from BRepBuilderAPI_ModifyShape.

    ◆ Perform()

    void BRepBuilderAPI_GTransform::Perform ( const TopoDS_Shape & S,
    const bool Copy = 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 (i.e. if the determinant of the vectorial part of T is equal to 1.), and if Copy equals false (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 S. Use the function Shape to access the result. Note: this framework can be reused to apply the same geometric transformation to other shapes: just specify them by calling the function Perform again.

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