![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Describes how to construct the following elementary transformations. More...
#include <Geom_Transformation.hxx>

Public Member Functions | |
| Geom_Transformation () | |
| Creates an identity transformation. | |
| Geom_Transformation (const gp_Trsf &T) | |
| Creates a transient copy of T. | |
| void | SetMirror (const gp_Pnt &thePnt) |
| Makes the transformation into a symmetrical transformation with respect to a point P. P is the center of the symmetry. | |
| void | SetMirror (const gp_Ax1 &theA1) |
| Makes the transformation into a symmetrical transformation with respect to an axis A1. A1 is the center of the axial symmetry. | |
| void | SetMirror (const gp_Ax2 &theA2) |
| Makes the transformation into a symmetrical transformation with respect to a plane. The plane of the symmetry is defined with the axis placement A2. It is the plane (Location, XDirection, YDirection). | |
| void | SetRotation (const gp_Ax1 &theA1, const double theAng) |
| Makes the transformation into a rotation. A1 is the axis rotation and Ang is the angular value of the rotation in radians. | |
| void | SetScale (const gp_Pnt &thePnt, const double theScale) |
| Makes the transformation into a scale. P is the center of the scale and S is the scaling value. | |
| void | SetTransformation (const gp_Ax3 &theFromSystem1, const gp_Ax3 &theToSystem2) |
| Makes a transformation allowing passage from the coordinate system "FromSystem1" to the coordinate system "ToSystem2". Example : In a C++ implementation : Real x1, y1, z1; // are the coordinates of a point in the // local system FromSystem1 Real x2, y2, z2; // are the coordinates of a point in the // local system ToSystem2 gp_Pnt P1 (x1, y1, z1) Geom_Transformation T; T.SetTransformation (FromSystem1, ToSystem2); gp_Pnt P2 = P1.Transformed (T); P2.Coord (x2, y2, z2);. | |
| void | SetTransformation (const gp_Ax3 &theToSystem) |
| Makes the transformation allowing passage from the basic coordinate system {P(0.,0.,0.), VX (1.,0.,0.), VY (0.,1.,0.), VZ (0., 0. ,1.) } to the local coordinate system defined with the Ax2 ToSystem. Same utilisation as the previous method. FromSystem1 is defaulted to the absolute coordinate system. | |
| void | SetTranslation (const gp_Vec &theVec) |
| Makes the transformation into a translation. V is the vector of the translation. | |
| void | SetTranslation (const gp_Pnt &P1, const gp_Pnt &P2) |
| Makes the transformation into a translation from the point P1 to the point P2. | |
| void | SetTrsf (const gp_Trsf &theTrsf) |
| Converts the gp_Trsf transformation T into this transformation. | |
| bool | IsNegative () const |
| Checks whether this transformation is an indirect transformation: returns true if the determinant of the matrix of the vectorial part of the transformation is less than 0. | |
| gp_TrsfForm | Form () const |
| Returns the nature of this transformation as a value of the gp_TrsfForm enumeration. | |
| double | ScaleFactor () const |
| Returns the scale value of the transformation. | |
| const gp_Trsf & | Trsf () const |
| Returns a non transient copy of <me>. | |
| double | Value (const int theRow, const int theCol) const |
| Returns the coefficients of the global matrix of transformation. It is a 3 rows X 4 columns matrix. | |
| void | Invert () |
| Raised if the transformation is singular. This means that the ScaleFactor is lower or equal to Resolution from package gp. | |
| occ::handle< Geom_Transformation > | Inverted () const |
| Raised if the transformation is singular. This means that the ScaleFactor is lower or equal to Resolution from package gp. | |
| occ::handle< Geom_Transformation > | Multiplied (const occ::handle< Geom_Transformation > &Other) const |
| Computes the transformation composed with Other and <me>. <me> * Other. Returns a new transformation. | |
| void | Multiply (const occ::handle< Geom_Transformation > &theOther) |
| Computes the transformation composed with Other and <me> . <me> = <me> * Other. | |
| void | Power (const int N) |
| Computes the following composition of transformations if N > 0 <me> * <me> * .......* <me>. if N = 0 Identity if N < 0 <me>.Invert() * .........* <me>.Invert() | |
| occ::handle< Geom_Transformation > | Powered (const int N) const |
| Raised if N < 0 and if the transformation is not inversible. | |
| void | PreMultiply (const occ::handle< Geom_Transformation > &Other) |
| Computes the matrix of the transformation composed with <me> and Other. <me> = Other * <me> | |
| void | Transforms (double &theX, double &theY, double &theZ) const |
| Applies the transformation <me> to the triplet {X, Y, Z}. | |
| occ::handle< Geom_Transformation > | Copy () const |
| Creates a new object which is a copy of this transformation. | |
| virtual void | DumpJson (Standard_OStream &theOStream, int theDepth=-1) const |
| Dumps the content of me into the stream. | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. | |
| virtual | ~Standard_Transient ()=default |
| Destructor must be virtual. | |
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| Returns a type descriptor about this object. | |
| bool | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| Returns a true value if this is an instance of Type. | |
| bool | IsInstance (const char *const theTypeName) const |
| Returns a true value if this is an instance of TypeName. | |
| bool | IsKind (const opencascade::handle< Standard_Type > &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. | |
| bool | IsKind (const char *const theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. | |
| Standard_Transient * | This () const |
| Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero. | |
| int | GetRefCount () const noexcept |
| Get the reference counter of this object. | |
| void | IncrementRefCounter () noexcept |
| Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations. | |
| int | DecrementRefCounter () noexcept |
| Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement. | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
| typedef void | base_type |
| Returns a type descriptor about this object. | |
Static Public Member Functions inherited from Standard_Transient | |
| static constexpr const char * | get_type_name () |
| Returns a type descriptor about this object. | |
| static const opencascade::handle< Standard_Type > & | get_type_descriptor () |
| Returns type descriptor of Standard_Transient class. | |
Describes how to construct the following elementary transformations.
V1 V2 V3 T | a11 a12 a13 a14 | | x | | x'| | a21 a22 a23 a24 | | y | | y'| | a31 a32 a33 a34 | | z | = | z'| | 0 0 0 1 | | 1 | | 1 |
where {V1, V2, V3} defines the vectorial part of the transformation and T defines the translation part of the transformation. Note: Geom_Transformation transformations provide the same kind of "geometric" services as gp_Trsf ones but have more complex data structures. The geometric objects provided by the Geom package use gp_Trsf transformations in the syntaxes Transform and Transformed. Geom_Transformation transformations are used in a context where they can be shared by several objects contained inside a common data structure.
| Geom_Transformation::Geom_Transformation | ( | ) |
Creates an identity transformation.
| Geom_Transformation::Geom_Transformation | ( | const gp_Trsf & | T | ) |
Creates a transient copy of T.
| occ::handle< Geom_Transformation > Geom_Transformation::Copy | ( | ) | const |
Creates a new object which is a copy of this transformation.
|
virtual |
Dumps the content of me into the stream.
|
inline |
Returns the nature of this transformation as a value of the gp_TrsfForm enumeration.
|
inline |
Raised if the transformation is singular. This means that the ScaleFactor is lower or equal to Resolution from package gp.
| occ::handle< Geom_Transformation > Geom_Transformation::Inverted | ( | ) | const |
Raised if the transformation is singular. This means that the ScaleFactor is lower or equal to Resolution from package gp.
|
inline |
Checks whether this transformation is an indirect transformation: returns true if the determinant of the matrix of the vectorial part of the transformation is less than 0.
| occ::handle< Geom_Transformation > Geom_Transformation::Multiplied | ( | const occ::handle< Geom_Transformation > & | Other | ) | const |
Computes the transformation composed with Other and <me>. <me> * Other. Returns a new transformation.
|
inline |
Computes the transformation composed with Other and <me> . <me> = <me> * Other.
| occ::handle< Geom_Transformation > Geom_Transformation::Powered | ( | const int | N | ) | const |
Raised if N < 0 and if the transformation is not inversible.
| void Geom_Transformation::PreMultiply | ( | const occ::handle< Geom_Transformation > & | Other | ) |
Computes the matrix of the transformation composed with <me> and Other. <me> = Other * <me>
|
inline |
Returns the scale value of the transformation.
Makes the transformation into a symmetrical transformation with respect to an axis A1. A1 is the center of the axial symmetry.
Makes the transformation into a symmetrical transformation with respect to a plane. The plane of the symmetry is defined with the axis placement A2. It is the plane (Location, XDirection, YDirection).
Makes the transformation into a symmetrical transformation with respect to a point P. P is the center of the symmetry.
Makes the transformation into a rotation. A1 is the axis rotation and Ang is the angular value of the rotation in radians.
Makes the transformation into a scale. P is the center of the scale and S is the scaling value.
|
inline |
Makes a transformation allowing passage from the coordinate system "FromSystem1" to the coordinate system "ToSystem2". Example : In a C++ implementation : Real x1, y1, z1; // are the coordinates of a point in the // local system FromSystem1 Real x2, y2, z2; // are the coordinates of a point in the // local system ToSystem2 gp_Pnt P1 (x1, y1, z1) Geom_Transformation T; T.SetTransformation (FromSystem1, ToSystem2); gp_Pnt P2 = P1.Transformed (T); P2.Coord (x2, y2, z2);.
Makes the transformation allowing passage from the basic coordinate system {P(0.,0.,0.), VX (1.,0.,0.), VY (0.,1.,0.), VZ (0., 0. ,1.) } to the local coordinate system defined with the Ax2 ToSystem. Same utilisation as the previous method. FromSystem1 is defaulted to the absolute coordinate system.
Makes the transformation into a translation from the point P1 to the point P2.
Makes the transformation into a translation. V is the vector of the translation.
Converts the gp_Trsf transformation T into this transformation.
Applies the transformation <me> to the triplet {X, Y, Z}.
|
inline |
Returns a non transient copy of <me>.
Returns the coefficients of the global matrix of transformation. It is a 3 rows X 4 columns matrix.
Raised if Row < 1 or Row > 3 or Col < 1 or Col > 4