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 ):
- Standard Axis System :
The three directions are defined either by coordinates, see
SetVectors /
SetMathAxis or with geometrical features thanks to the
SetAxisDirection method.
- Axis Rotation Axis System:
The rotation's axis direction is defined either by coordinates or with a
geometrical feature like any axis with the Standard way.
The rotation about this axis is defined by the rotation of a geometry
projected in the orthogonal plane to the rotation's axis. The rotation's
angle value is a knowledge parameter consultable and modifiable with the
GetAxisRotationParm method. The geometry is a geometrical feature, named reference, that you can set with the
SetAxisRotationReference method and that you can retrieve with the
GetAxisRotationReference method.
- Euler Angles Axis System:
The three directions are automatically computed thanks to three
angle values. You retrieve the knowledge parameters to consult the angle values
or modify them thanks to the
GetEulerAnglesParm method. In this case, the axis system already forms an orthonormal and right-handed axis system.
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.
- In the Standard axis system, the first direction
is never modified, the second and the third axis directions can be
re-computed to have an orthogonal axis system
- In the Axis Rotation axis system,
the axis of rotation is defined by the first axis direction. The second axis direction
is the rotation's reference and the third can be
re-computed to have an orthogonal axis system
To change the axis direction order there are two steps to follow:
- Call for each axis direction the
SetAxisType method with the CATAxisSystemSameDirection value
- 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
-
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
-
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
-
Retrieves the axis system type.
- Parameters:
-
- oAxisSystemType
- The axis system type.
o GetAxisType
-
Retrieves the axis direction definition mode.
- Parameters:
-
- iAxisNumber
- The number of the axis direction.
- oDirectionType
- The axis direction definition mode.
o GetBRepAlias
-
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
-
- 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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
Sets a geometrical feature to define an axis direction.
Role:This method enables you two things:
- iPointLineOrPlane is not NULL_var: To link an axis
direction to a geometry. In this case, the
method automatically changes the axis direction definition mode to become
CATAxisSystemSameDirection if the mode is
CATAxisSystemCoordinatesDirection otherwise the mode
is not changed.
- iPointLineOrPlane is NULL_var: If the
axis direction definition mode is not
CATAxisSystemCoordinatesDirection the axis direction will
be build in order to have an orthogonal axis system
- Parameters:
-
- iAxisNumber
- The number of the axis.
- iPointLineOrPlane
- It is a geometrical feature which can be:
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
-
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:
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:
-
o SetAxisSystemType
-
Sets the axis system type.
Role:This method enables you to modify the type of the axis
system. This method modifies the internal data:
- iAxisSystemType != CATAxisSystemAxisRotation
The parameters of the Axis Rotation type are lost: there is no more
the angle parameter and the geometry is lost
- iAxisSystemType != CATAxisSystemEulerAngles
The parameters of the Euler type are lost: there is no more
the three angle parameters.
- Parameters:
-
- iAxisSystemType
- The axis system type.
o SetAxisType
-
Sets the axis direction definition mode.
Role: An axis direction can be defined either by a
geometrical feature or by coordinates.
- iDirectionType= CATAxisSystemCoordinatesDirection: the axis
direction is defined by coordinates.
- iDirectionType<>CATAxisSystemCoordinatesDirection and
GetAxisDirection returns no feature: the axis direction will be computed in order to
build an orthogonal axis system with the two other axes.
- iDirectionType= CATAxisSystemSameDirection
and
GetAxisDirection returns a feature: The axis is defined by a geometry which can be.
- A point, the axis direction is the vector from
the origin point to the point.
- A line, the axis direction is the line direction.
- A plane, the axis direction is the normal vector to the plane.
- iDirectionType= CATAxisSystemOppositeDirection
and
GetAxisDirection returns a feature: The axis is defined by a geometry which can be.
- A point, the axis direction is the vector from
the point to the origin point.
- A line, the axis direction is opposed to the line direction.
- A plane, the axis direction is opposed the normal vector to the
plane.
- 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
-
- Parameters:
-
- iComputed
- Equals to TRUE if deleted inputs are auto computed (old axis system )
o SetMathAxis
-
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
-
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
-
Sets a geometrical feature to define the origin.
Role:This method enables you two things:
- iOriginPoint is not NULL_var: To link the axis
system origin position to a point feature position. In this case, the
method automatically changes the origin definition mode to become
CATAxisSystemPoint
- iOriginPoint is NULL_var: If the
origin definition mode is CATAxisSystemPoint the origin will
be located at the intersection of the three axes.
- Parameters:
-
- iOriginPoint
- The geometrical point defining the origin. It should be a feature:
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
-
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
-
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.