Open CASCADE Technology  7.3.1.dev
Public Member Functions
Geom_Transformation Class Reference

Describes how to construct the following elementary transformations. More...

#include <Geom_Transformation.hxx>

Inheritance diagram for Geom_Transformation:
Inheritance graph
[legend]

Public Member Functions

 Geom_Transformation ()
 Creates an identity transformation. More...
 
 Geom_Transformation (const gp_Trsf &T)
 Creates a transient copy of T. More...
 
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. More...
 
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. More...
 
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). More...
 
void SetRotation (const gp_Ax1 &theA1, const Standard_Real theAng)
 Makes the transformation into a rotation. A1 is the axis rotation and Ang is the angular value of the rotation in radians. More...
 
void SetScale (const gp_Pnt &thePnt, const Standard_Real theScale)
 Makes the transformation into a scale. P is the center of the scale and S is the scaling value. More...
 
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);. More...
 
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. More...
 
void SetTranslation (const gp_Vec &theVec)
 Makes the transformation into a translation. V is the vector of the translation. More...
 
void SetTranslation (const gp_Pnt &P1, const gp_Pnt &P2)
 Makes the transformation into a translation from the point P1 to the point P2. More...
 
void SetTrsf (const gp_Trsf &theTrsf)
 Converts the gp_Trsf transformation T into this transformation. More...
 
Standard_Boolean 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. More...
 
gp_TrsfForm Form () const
 Returns the nature of this transformation as a value of the gp_TrsfForm enumeration. More...
 
Standard_Real ScaleFactor () const
 Returns the scale value of the transformation. More...
 
const gp_TrsfTrsf () const
 Returns a non transient copy of <me>. More...
 
Standard_Real Value (const Standard_Integer theRow, const Standard_Integer theCol) const
 Returns the coefficients of the global matrix of transformation. It is a 3 rows X 4 columns matrix. More...
 
void Invert ()
 Raised if the the transformation is singular. This means that the ScaleFactor is lower or equal to Resolution from package gp. More...
 
Handle< Geom_TransformationInverted () const
 Raised if the the transformation is singular. This means that the ScaleFactor is lower or equal to Resolution from package gp. More...
 
Handle< Geom_TransformationMultiplied (const Handle< Geom_Transformation > &Other) const
 Computes the transformation composed with Other and <me>. <me> * Other. Returns a new transformation. More...
 
void Multiply (const Handle< Geom_Transformation > &theOther)
 Computes the transformation composed with Other and <me> . <me> = <me> * Other. More...
 
void Power (const Standard_Integer N)
 Computes the following composition of transformations if N > 0 <me> * <me> * .......* <me>. if N = 0 Identity if N < 0 <me>.Invert() * .........* <me>.Invert() More...
 
Handle< Geom_TransformationPowered (const Standard_Integer N) const
 Raised if N < 0 and if the transformation is not inversible. More...
 
void PreMultiply (const Handle< Geom_Transformation > &Other)
 Computes the matrix of the transformation composed with <me> and Other. <me> = Other * <me> More...
 
void Transforms (Standard_Real &theX, Standard_Real &theY, Standard_Real &theZ) const
 Applies the transformation <me> to the triplet {X, Y, Z}. More...
 
Handle< Geom_TransformationCopy () const
 Creates a new object which is a copy of this transformation. More...
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor. More...
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing. More...
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter. More...
 
virtual ~Standard_Transient ()
 Destructor must be virtual. More...
 
virtual void Delete () const
 Memory deallocator for transient classes. More...
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object. More...
 
Standard_Boolean IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type. More...
 
Standard_Boolean IsInstance (const Standard_CString theTypeName) const
 Returns a true value if this is an instance of TypeName. More...
 
Standard_Boolean 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. More...
 
Standard_Boolean IsKind (const Standard_CString 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. More...
 
Standard_TransientThis () 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. More...
 
Standard_Integer GetRefCount () const
 Get the reference counter of this object. More...
 
void IncrementRefCounter () const
 Increments the reference counter of this object. More...
 
Standard_Integer DecrementRefCounter () const
 Decrements the reference counter of this object; returns the decremented value. More...
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object. More...
 
- Static Public Member Functions inherited from Standard_Transient
static const char * get_type_name ()
 Returns a type descriptor about this object. More...
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class. More...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Geom_Transformation() [1/2]

Geom_Transformation::Geom_Transformation ( )

Creates an identity transformation.

◆ Geom_Transformation() [2/2]

Geom_Transformation::Geom_Transformation ( const gp_Trsf T)

Creates a transient copy of T.

Member Function Documentation

◆ Copy()

Handle< Geom_Transformation > Geom_Transformation::Copy ( ) const

Creates a new object which is a copy of this transformation.

◆ Form()

gp_TrsfForm Geom_Transformation::Form ( ) const
inline

Returns the nature of this transformation as a value of the gp_TrsfForm enumeration.

◆ Invert()

void Geom_Transformation::Invert ( )
inline

Raised if the the transformation is singular. This means that the ScaleFactor is lower or equal to Resolution from package gp.

◆ Inverted()

Handle< Geom_Transformation > Geom_Transformation::Inverted ( ) const

Raised if the the transformation is singular. This means that the ScaleFactor is lower or equal to Resolution from package gp.

◆ IsNegative()

Standard_Boolean Geom_Transformation::IsNegative ( ) const
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.

◆ Multiplied()

Handle< Geom_Transformation > Geom_Transformation::Multiplied ( const Handle< Geom_Transformation > &  Other) const

Computes the transformation composed with Other and <me>. <me> * Other. Returns a new transformation.

◆ Multiply()

void Geom_Transformation::Multiply ( const Handle< Geom_Transformation > &  theOther)
inline

Computes the transformation composed with Other and <me> . <me> = <me> * Other.

◆ Power()

void Geom_Transformation::Power ( const Standard_Integer  N)
inline

Computes the following composition of transformations if N > 0 <me> * <me> * .......* <me>. if N = 0 Identity if N < 0 <me>.Invert() * .........* <me>.Invert()

Raised if N < 0 and if the transformation is not inversible

◆ Powered()

Handle< Geom_Transformation > Geom_Transformation::Powered ( const Standard_Integer  N) const

Raised if N < 0 and if the transformation is not inversible.

◆ PreMultiply()

void Geom_Transformation::PreMultiply ( const Handle< Geom_Transformation > &  Other)

Computes the matrix of the transformation composed with <me> and Other. <me> = Other * <me>

◆ ScaleFactor()

Standard_Real Geom_Transformation::ScaleFactor ( ) const
inline

Returns the scale value of the transformation.

◆ SetMirror() [1/3]

void Geom_Transformation::SetMirror ( const gp_Pnt thePnt)
inline

Makes the transformation into a symmetrical transformation with respect to a point P. P is the center of the symmetry.

◆ SetMirror() [2/3]

void Geom_Transformation::SetMirror ( const gp_Ax1 theA1)
inline

Makes the transformation into a symmetrical transformation with respect to an axis A1. A1 is the center of the axial symmetry.

◆ SetMirror() [3/3]

void Geom_Transformation::SetMirror ( const gp_Ax2 theA2)
inline

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).

◆ SetRotation()

void Geom_Transformation::SetRotation ( const gp_Ax1 theA1,
const Standard_Real  theAng 
)
inline

Makes the transformation into a rotation. A1 is the axis rotation and Ang is the angular value of the rotation in radians.

◆ SetScale()

void Geom_Transformation::SetScale ( const gp_Pnt thePnt,
const Standard_Real  theScale 
)
inline

Makes the transformation into a scale. P is the center of the scale and S is the scaling value.

◆ SetTransformation() [1/2]

void Geom_Transformation::SetTransformation ( const gp_Ax3 theFromSystem1,
const gp_Ax3 theToSystem2 
)
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);.

◆ SetTransformation() [2/2]

void Geom_Transformation::SetTransformation ( const gp_Ax3 theToSystem)
inline

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.

◆ SetTranslation() [1/2]

void Geom_Transformation::SetTranslation ( const gp_Vec theVec)
inline

Makes the transformation into a translation. V is the vector of the translation.

◆ SetTranslation() [2/2]

void Geom_Transformation::SetTranslation ( const gp_Pnt P1,
const gp_Pnt P2 
)
inline

Makes the transformation into a translation from the point P1 to the point P2.

◆ SetTrsf()

void Geom_Transformation::SetTrsf ( const gp_Trsf theTrsf)
inline

Converts the gp_Trsf transformation T into this transformation.

◆ Transforms()

void Geom_Transformation::Transforms ( Standard_Real theX,
Standard_Real theY,
Standard_Real theZ 
) const
inline

Applies the transformation <me> to the triplet {X, Y, Z}.

◆ Trsf()

const gp_Trsf& Geom_Transformation::Trsf ( ) const
inline

Returns a non transient copy of <me>.

◆ Value()

Standard_Real Geom_Transformation::Value ( const Standard_Integer  theRow,
const Standard_Integer  theCol 
) const
inline

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


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