CATMecModUseItf Interface CATIMf3DAxisSystem

Usage: an implementation of this interface is supplied and you must use it as is. You should not reimplement it.


interface CATIMf3DAxisSystem

Interface for an axis system.
Role:This interface enables you to modify or retrieve the characterictics of an axis system created by the CATIMf3DAxisSystemFactory interface. An axis system is a feature defined by an origin and three axis directions.

Axis System Origin
An axis system is located at a position in the absolute axis system which represents the origin. This location can be defined either by three coordinates , see SetOrigin / SetMathAxis , it can be defined by a geometrical feature, or it can be at the origin of the three axis directions. For the last two cases, refer to the SetOriginPoint method.

Axis Directions
An axis system is defined by three orthonormal axis directions. If the three axis directions are not orthogonal, the update operation on the feature will generate an error.
There are three ways to define the axis directions of an axis system, each of them depends on the axis system type ( CATAxisSystemType ):

The Axis System Internal Data
An axis system is internally defined by twelve knowledge parameters that you can retrieve by the GetParm methods. These parameters are computed from the origin and the axes valuations.

The Axis Order
The axis order enables to compute an ortho-normal axis system if its internal data do not form one. Except the Euler axis system where the axis order is not customizable, it can be important to control the axis order.

To change the axis direction order there are two steps to follow:
  1. Call for each axis direction the SetAxisType method with the CATAxisSystemSameDirection value
  2. Call the SetAxisDirection method with the CATAxisSystemXYZNumber in the order
Refer to the article entitled "Creating Axis Systems" in the CAA Encyclopedia for more details about the axis order implementation.

The Axis System Orientation
The axis system orientation is consultable with the IsDirect method. Except the Euler axis system which is always right-handed, you can control the axis system orientation. It is enough to control the vector coordinates or to control the geometrical feature direction. In this last case, with the SetAxisType method you can inverse an axis direction with CATAxisSystemOppositeDirection option.

The Explicit Axis System
It is possible to "fix" the geometry, the associated CATBody, of the feature. In this case, the feature is isolated and you cannot modify it. See the SetAxisSystemType method.

The Axis System Sub-Elements
The sub-elements are the three planes, the three axes and the origin point of the axis system. They are BRep objects, in other words objects handled by the CATIMmiUseBRepAccess interface. You retrieve them by the GetPlaneBRepAccess , GetAxisBRepAccess and GetOriginPointBRepAccess methods respectively. You should featurize them ( CATIMmiUseFeaturize ) before using them as input of features.


Method Index


o GetAxisDirection(CATAxisSystemXYZNumber,CATBaseUnknown_var&)
Retrieves the geometrical feature which defines an axis direction.
o GetAxisRotationParm(CATICkeParm_var&)
Retrieves the rotation angle parameter.
o GetAxisRotationReference(CATBaseUnknown_var&)
Retrieves the reference's geometry for the rotation about the rotation axis.
o GetAxisSystemType(CATAxisSystemType&)
Retrieves the axis system type.
o GetAxisType(CATAxisSystemXYZNumber,CATAxisSystemDirectionType&)
Retrieves the axis direction definition mode.
o GetBRepAlias(CATCell_var&,CATUnicodeString&)
Retrieves the name of a BRep object of the axis system.
o GetComputed(CATBoolean&)
o GetEulerAnglesParm(CATICkeParm_var[3])
Retrieves the Euler angle parameters.
o GetMathAxis(CATMathAxis&)
Retrieves the mathematical axis system.
o GetOrigin(CATMathPoint&)
Retrieves the origin location with a mathematical point.
o GetOriginPoint(CATBaseUnknown_var&)
Retrieves the geometrical feature which defines the origin.
o GetOriginType(CATAxisSystemPointType&)
Retrieves the origin definition mode.
o GetParm(CATICkeParm_var[4][3])
Retrieves the internal parameters of the axis system.
o GetVectors(CATMathVector&,CATMathVector&)
Retrieves the X axis and Y axis directions.
o IsCurrent(CATBoolean&)
Retrieves if the axis system is the current one.
o IsDirect(CATAxisSystemIsDirect&)
Retrieves the axis system orientation.
o RetrieveAxisBRepAccess(CATAxisSystemXYZNumber,CATBaseUnknown_var&)
Retrieves the BRep object of the X, Y or Z axis.
o RetrieveOriginPointBRepAccess(CATBaseUnknown_var&)
Retrieves the BRep object of the origin point.
o RetrievePlaneBRepAccess(CATAxisSystemXYZNumber,CATBaseUnknown_var&)
Retrieves the BRep object of the YZ, ZX or XY plane.
o SetAxisDirection(CATAxisSystemXYZNumber,CATBaseUnknown_var&)
Sets a geometrical feature to define an axis direction.
o SetAxisRotationReference(CATBaseUnknown_var&)
Valuates the reference's geometry for the rotation about the rotation axis.
o SetAxisSystemType(CATAxisSystemType)
Sets the axis system type.
o SetAxisType(CATAxisSystemXYZNumber,CATAxisSystemDirectionType)
Sets the axis direction definition mode.
o SetComputed(CATBoolean&)
o SetMathAxis(CATMathAxis&)
Valuates the axis system with a mathematical axis system.
o SetOrigin(CATMathPoint&)
Valuates the origin location with a mathematical point.
o SetOriginPoint(CATBaseUnknown_var&)
Sets a geometrical feature to define the origin.
o SetOriginType(CATAxisSystemPointType)
Sets the origin definition mode.
o SetVectors(CATMathVector&,CATMathVector&)
Valuates the axis directions.

Methods


o GetAxisDirection
public virtual HRESULT GetAxisDirection( const CATAxisSystemXYZNumber iAxisNumber,
CATBaseUnknown_var& oPointLineOrPlane) const=0
Retrieves the geometrical feature which defines an axis direction.
Parameters:
iAxisNumber
The number of the axis.
oPointLineOrPlane
The geometrical element defining the axis. If the
SetAxisDirection method has never been called, the returned value is NULL_var.
o GetAxisRotationParm
public virtual HRESULT GetAxisRotationParm(CATICkeParm_var& oAngleParm) const =0
Retrieves the rotation angle parameter.
Role:This method returns the knowledge parameter which defines the rotation angle about the rotation's axis. You can change the parameter value to modify the angle value.
Parameters:
oAngleParm
The parameter of the rotation angle.
Returns:
  • E_FAIL: If an internal error or if the axis system is not CATAxisSystemAxisRotation,
  • S_OK: otherwise .
o GetAxisRotationReference
public virtual HRESULT GetAxisRotationReference(CATBaseUnknown_var& oReference) const =0
Retrieves the reference's geometry for the rotation about the rotation axis.
Role:This method returns the geometrical feature which represents the reference for the rotation about the rotation axis.
Parameters:
oReference
  • E_FAIL: If an internal error or if the axis system is not CATAxisSystemAxisRotation,
  • S_OK: otherwise .
o GetAxisSystemType
public virtual HRESULT GetAxisSystemType(CATAxisSystemType& oAxisSystemType) const =0
Retrieves the axis system type.
Parameters:
oAxisSystemType
The axis system type.
o GetAxisType
public virtual HRESULT GetAxisType( const CATAxisSystemXYZNumber iAxisNumber,
CATAxisSystemDirectionType& oDirectionType) const=0
Retrieves the axis direction definition mode.
Parameters:
iAxisNumber
The number of the axis direction.
oDirectionType
The axis direction definition mode.
o GetBRepAlias
public virtual HRESULT GetBRepAlias( const CATCell_var& iCell,
CATUnicodeString& oBRepName) const=0
Retrieves the name of a BRep object of the axis system.
Parameters:
iCell
A cell (vertex, edge or face) of the axis system.
oBRepName
The name of the BRep object.
Returns:
  • E_FAIL: If an internal error or if iCell is not a cell of the axis system,
  • E_INVALIDARG: If iCell is equal to NULL_var,
  • S_OK: otherwise.
o GetComputed
public virtual HRESULT GetComputed(CATBoolean& oComputed)const=0
Parameters:
oComputed
Returns TRUE if deleted inputs are auto computed (old axis system )
o GetEulerAnglesParm
public virtual HRESULT GetEulerAnglesParm(CATICkeParm_var[3] oEulerAngles) const =0
Retrieves the Euler angle parameters.
Role:This method returns the three knowledge parameters which define the Euler angles. You can change the parameter values to modify the angle values.
Parameters:
oEulerAngles
The three Euler angles parameters.
Returns:
  • E_FAIL: If an internal error or if the axis system is not CATAxisSystemEulerAngles,
  • S_OK: otherwise.
o GetMathAxis
public virtual HRESULT GetMathAxis(CATMathAxis& oMathAxis) const =0
Retrieves the mathematical axis system.
Role:This method retrieves from the axis system parameters a mathematical axis system. Any way the axis directions or the origin has been defined, this method returns a mathematical axis system. But attention, the result can be false if an axis direction or the origin is geometry dependant. An axis system update ensures the result.
Parameters:
oMathAxis
The mathematical axis
o GetOrigin
public virtual HRESULT GetOrigin(CATMathPoint& oOriginPoint) const =0
Retrieves the origin location with a mathematical point.
Role:This method retrieves from the axis system parameters the location of the axis system origin. Any way the origin has been defined, with a mathematical point, with a geometry or at the origin of the three axis, this method returns the location of the origin. But attention, the result can be false if the origin is geometry dependant. An axis system update ensures the result.
Parameters:
oOriginPoint
The mathematical point of the origin.
o GetOriginPoint
public virtual HRESULT GetOriginPoint(CATBaseUnknown_var& oOriginPoint) const=0
Retrieves the geometrical feature which defines the origin.
Parameters:
oOriginPoint
The geometrical point (
CATPoint ) or vertex ( CATIMfPoint ) which defines the origin. If the SetOriginPoint method has never been called, the returned value is NULL_var.
o GetOriginType
public virtual HRESULT GetOriginType(CATAxisSystemPointType& oPointType) const =0
Retrieves the origin definition mode.
Parameters:
oPointType
The definition type of the origin.
o GetParm
public virtual HRESULT GetParm(CATICkeParm_var[4][3] oCoord) const =0
Retrieves the internal parameters of the axis system.
Role:This method retrieves the internal parameters which define the origin and the three axes. The value of each parameter can be wrong if the axis system is not up to date.
If you modify a parameter, its value can be changed to have an orthogonal axis system. If the parameters form a null vector or form two colinear vectors, the axis system is not valid. Its update generates an error.
Parameters:
oCoord
Twelve parameters representing the three coordinates (x,y,z) of :
  • The origin point
  • Three vectors,the X,Y Z axis respectively
o GetVectors
public virtual HRESULT GetVectors(CATMathVector& oVectorX,
CATMathVector& oVectorY) const =0
Retrieves the X axis and Y axis directions.
Role:This method retrieves from the axis system parameters the mathematical vectors wich define the X axis and the Y axis directions. Any way the axis directions has been defined, with mathematical vectors, with geometries or automatically computed, this method returns the vector coordinates. But attention, the result can be false if an axis direction is geometry dependant. An axis system update ensures the result.
Parameters:
oVectorX
The mathematical vector of the X axis
oVectorY
The mathematical vector of the Y axis
o IsCurrent
public virtual HRESULT IsCurrent(CATBoolean& oIsCurrent) const=0
Retrieves if the axis system is the current one.
Role:An axis system can be the current one with the CATIMf3DAxisSystemManager.SetAxisSystemCurrent method. This method allows you to know if this axis system is the current one.
Parameters:
oIsCurrent
Equal to TRUE if the axis system is the current one, else equal to FALSE.
o IsDirect
public virtual HRESULT IsDirect(CATAxisSystemIsDirect& oIsDirect) const=0
Retrieves the axis system orientation.
Role:This method enables you to know if the axis system is right-handed (direct) or left-handed (reverse) or not orthogonal. The update operation on a not orthogonal axis system generates an error.
Parameters:
oIsDirect
Right-handed, left-handed or not orthogonal.
o RetrieveAxisBRepAccess
public virtual HRESULT RetrieveAxisBRepAccess( const CATAxisSystemXYZNumber iAxisNumber,
CATBaseUnknown_var& oAxisBRepAccess) const =0
Retrieves the BRep object of the X, Y or Z axis.
Parameters:
iAxisNumber
The number of the axis.
oAxisBRepAccess
The BRep object of the axis.
Returns:
  • E_FAIL: If an internal error or if the topological body ( the CATBody ) does not exist,
  • S_OK: otherwise.
o RetrieveOriginPointBRepAccess
public virtual HRESULT RetrieveOriginPointBRepAccess(CATBaseUnknown_var& oOriginPointBRepAccess) const=0
Retrieves the BRep object of the origin point.
Role:
Parameters:
oOriginPointBRepAccess
The BRep object of the origin point.
Returns:
  • E_FAIL: If an internal error or if the topological body ( the CATBody ) does not exist,
  • S_OK: otherwise.
o RetrievePlaneBRepAccess
public virtual HRESULT RetrievePlaneBRepAccess( const CATAxisSystemXYZNumber iAxisNumber,
CATBaseUnknown_var& oPlaneBRepAccess) const =0
Retrieves the BRep object of the YZ, ZX or XY plane.
Parameters:
iAxisNumber
The number of the plane.
  • CATAxisSystemXNumber: the plane YZ.
  • CATAxisSystemYNumber: the plane ZX.
  • CATAxisSystemZNumber: the plane XY.
oPlaneBRepAccess
The Brep object of the plane.
Returns:
  • E_FAIL: If an internal error or if the topological body ( the CATBody ) does not exist,
  • S_OK: otherwise.
o SetAxisDirection
public virtual HRESULT SetAxisDirection( const CATAxisSystemXYZNumber iAxisNumber,
const CATBaseUnknown_var& iPointLineOrPlane) =0
Sets a geometrical feature to define an axis direction.
Role:This method enables you two things:
Parameters:
iAxisNumber
The number of the axis.
iPointLineOrPlane
It is a geometrical feature which can be:
  • A point (
CATPoint or CATIMfPoint ) , the axis direction is the vector from the origin point to the point. (*)
  • A line ( CATLine or CATIMfLine ), the axis direction is the line direction. (*)
  • A plane ( CATPlane or CATIMfPlane ), the axis direction is the normal vector to the plane. (*)
  • (*)If the axis direction definition mode is CATAxisSystemSameDirection otherwise the direction is opposed.
    The CATIMfLine, CATIMfPlane and CATIMfPoint features are the featurizations of a selecting object. They are called BRep features. Refer to the CATIMmiUseBRepAccess and CATIMmiUseFeaturize interfaces for more information about the BRep features.
    Returns:
    • E_FAIL: If an internal error or if the axis system is explicit ( CATAxisSystemType ),
    • S_OK: otherwise.
    o SetAxisRotationReference
    public virtual HRESULT SetAxisRotationReference( const CATBaseUnknown_var& iReference) =0
    Valuates the reference's geometry for the rotation about the rotation axis.
    Role:This method enables you to affect a geometrical feature to represent the axis which will be projected in the orthogonal plane to the rotation's axis. It represents the rotation's reference.
    Parameters:
    iReference
    It is a geometrical feature, which can be:
    • A point (
    CATPoint or CATIMfPoint ) : the axis direction is the vector from the origin point to the point.(*)
  • A line ( CATLine or CATIMfLine ): the axis direction is the line direction.(*)
  • A plane ( CATPlane or CATIMfPlane ): the axis direction is the normal vector to the plane.(*)
  • (*)If the axis direction definition mode is CATAxisSystemSameDirection otherwise the direction is opposed.
    The CATIMfLine, CATIMfPlane and CATIMfPoint features are the featurizations of a selecting object. They are called BRep features. Refer to the CATIMmiUseBRepAccess and CATIMmiUseFeaturize interfaces for more information about the BRep features.
    Returns:
    • E_FAIL: for an internal error or if the axis system is not CATAxisSystemAxisRotation
    • E_INVALIDARG: the reference is not valid: it is not a CATPlane, CATLine, CATPoint, CATIMfPlane, CATIMfPoint or a CATIMfLine.
    • S_OK: otherwise
    o SetAxisSystemType
    public virtual HRESULT SetAxisSystemType( const CATAxisSystemType iAxisSystemType) =0
    Sets the axis system type.
    Role:This method enables you to modify the type of the axis system. This method modifies the internal data:
    Parameters:
    iAxisSystemType
    The axis system type.
    o SetAxisType
    public virtual HRESULT SetAxisType( const CATAxisSystemXYZNumber iAxisNumber,
    const CATAxisSystemDirectionType iDirectionType) =0
    Sets the axis direction definition mode.
    Role: An axis direction can be defined either by a geometrical feature or by coordinates.
    Parameters:
    iAxisNumber
    The number of the axis direction.
    iDirectionType
    The axis direction type.
    Returns:
    • E_FAIL: an internal error or if the axis system is explicit ( CATAxisSystemType ),
    • S_OK: otherwise.
    o SetComputed
    public virtual HRESULT SetComputed( const CATBoolean& iComputed)=0
    Parameters:
    iComputed
    Equals to TRUE if deleted inputs are auto computed (old axis system )
    o SetMathAxis
    public virtual HRESULT SetMathAxis( const CATMathAxis& iMathAxis) =0
    Valuates the axis system with a mathematical axis system.
    Role:This method enables you to valuate the axis system with a mathematical axis system. This method automatically unset the geometry (origin / three axis directions) and changes the type ( origin/ three axis direction) to become CATAxisSystemCoordinatesPoint and CATAxisSystemCoordinatesDirection respectively. So after this call, the GetAxisDirection method returns NULL_var for the three axis directions and the GetOriginPoint method returns NULL_var for the origin.
    A mathematical axis system is by construction orthonormal. So the axis system is orthonormal. But like any CATMathAxis object, it may be right-handed or left-handed.
    Parameters:
    iMathAxis
    The mathematical axis system. If iMathAxis is not valid (a NULL vector or two colinear vectors) the axis system update will generate an error. The
    CATAxisSystemIsDirect value becomes CATAxisSystemNorOrthogonal
    Returns:
    • E_FAIL: If an internal error or if the axis system is explicit ( CATAxisSystemType ),
    • S_OK: otherwise.
    o SetOrigin
    public virtual HRESULT SetOrigin( const CATMathPoint& iOriginPoint) =0
    Valuates the origin location with a mathematical point.
    Role:This method enables you to locate the axis system origin with a mathematical point. This method automatically changes the origin definition mode to become CATAxisSystemCoordinatesPoint and unset the geometry. The GetOriginPoint method returns NULL_var after this call.
    Parameters:
    iOriginPoint
    The mathematical point of the origin.
    Returns:
    • E_FAIL: If an internal error or if the axis system is explicit ( CATAxisSystemType ),
    • S_OK: otherwise.
    o SetOriginPoint
    public virtual HRESULT SetOriginPoint( const CATBaseUnknown_var& iOriginPoint) =0
    Sets a geometrical feature to define the origin.
    Role:This method enables you two things:
    Parameters:
    iOriginPoint
    The geometrical point defining the origin. It should be a feature:
    • A point:
    CATPoint
  • A vertex: CATIMfPoint. It is the BRep feature of a vertex. Refer to CATIMmiUseBRepAccess and CATIMmiUseFeaturize interfaces for details about the BRep object featurization.
  • Returns:
    • E_FAIL: If an internal error or if the axis system is explicit ( CATAxisSystemType ),
    • S_OK: otherwise.
    o SetOriginType
    public virtual HRESULT SetOriginType( const CATAxisSystemPointType iPointType) =0
    Sets the origin definition mode.
    Role:The origin point can be defined either by a geometrical point or by coordinates.
    Parameters:
    iPointType
    The origin definition mode.
    • iPointType=CATAxisSystemCoordinatesPoint:
    • Its specifies that the origin stays at the position defined by its coordinates.
    • iPointType=CATAxisSystemPoint and
    GetOriginPoint returns NULL_var
    Its specifies that the origin will be located at the intersection of the three axes.
  • iPointType=CATAxisSystemPoint and GetOriginPoint returns a feature

  • its specifies that the origin stands at the position defined by the point feature.
    Returns:
    • E_FAIL: If an internal error or if the axis system is explicit ( CATAxisSystemType ),
    • S_OK: otherwise.
    o SetVectors
    public virtual HRESULT SetVectors( const CATMathVector& iVectorX,
    const CATMathVector& iVectorY) =0
    Valuates the axis directions.
    Role:This method Valuates the axis directions with mathematical vectors to define a right-handed axis system.
    Role:This method enables you to valuate the three axes from two mathematical vectors. The third axis is equal to the vectorial product of these two vectors. This method automatically changes each axis direction definition mode to become CATAxisSystemCoordinatesDirection and unset the geometry. So after this call, the GetAxisDirection method returns NULL_var for the three axis directions.
    Parameters:
    iVectorX
    The mathematical vector of the X axis
    iVectorY
    The mathematical vector of the Y axis
    Returns:
    • E_FAIL: If an internal error or if the axis system is explicit ( CATAxisSystemType ),
    • E_INVALIDARG: If the two vectors are not orthogonal,
    • S_OK: otherwise.

    This object is included in the file: CATIMf3DAxisSystem.h
    If needed, your Imakefile.mk should include the module: CATMecModUseItf

    Copyright © 1999-2014, Dassault Systèmes. All rights reserved.