|
AnyCAD Rapid API 2026
Help you to create a better world!
|
Describes a coordinate system in 3D space. Unlike a gp_Ax2 coordinate system, a gp_Ax3 can be right-handed ("direct sense") or left-handed ("indirect sense"). A coordinate system is defined by: - its origin (also referred to as its "Location point"), and - three orthogonal unit vectors, termed the "X Direction", the "Y Direction" and the "Direction" (also referred to as the "main Direction"). The "Direction" of the coordinate system is called its "main Direction" because whenever this unit vector is modified, the "X Direction" and the "Y Direction" are recomputed. However, when we modify either the "X Direction" or the "Y Direction", "Direction" is not modified. "Direction" is also the "Z Direction". The "main Direction" is always parallel to the cross product of its "X Direction" and "Y Direction". If the coordinate system is right-handed, it satisfies the equation: "main Direction" = "X Direction" ^ "Y Direction" and if it is left-handed, it satisfies the equation: "main Direction" = -"X Direction" ^ "Y Direction" A coordinate system is used: - to describe geometric entities, in particular to position them. The local coordinate system of a geometric entity serves the same purpose as the STEP function "axis placement three axes", or - to define geometric transformations. Note: - We refer to the "X Axis", "Y Axis" and "Z Axis", respectively, as the axes having: - the origin of the coordinate system as their origin, and - the unit vectors "X Direction", "Y Direction" and "main Direction", respectively, as their unit vectors. - The "Z Axis" is also the "main Axis". - gp_Ax2 is used to define a coordinate system that must be always right-handed. 更多...
Public 成员函数 | |
| GAx3 (global::System.IntPtr cPtr, bool cMemoryOwn) | |
| 仅供内部使用 | |
| void | Dispose () |
| GAx3 () | |
| Creates an object corresponding to the reference coordinate system (OXYZ). | |
| GAx3 (GAx2 theA) | |
| Creates a coordinate system from a right-handed coordinate system. | |
| GAx3 (GPnt theP, GDir theN, GDir theVx) | |
| Creates a right handed axis placement with the "Location" point theP and two directions, theN gives the "Direction" and theVx gives the "XDirection". Raises ConstructionError if theN and theVx are parallel (same or opposite orientation). | |
| GAx3 (GPnt theP, GDir theV) | |
| Creates an axis placement with the "Location" point <theP> and the normal direction <theV>. | |
| void | XReverse () |
| Reverses the X direction of <me>. | |
| void | YReverse () |
| Reverses the Y direction of <me>. | |
| void | ZReverse () |
| Reverses the Z direction of <me>. | |
| void | SetAxis (GAx1 theA1) |
| Assigns the origin and "main Direction" of the axis theA1 to this coordinate system, then recomputes its "X Direction" and "Y Direction". Note: - The new "X Direction" is computed as follows: new "X Direction" = V1 ^(previous "X Direction" ^ V) where V is the "Direction" of theA1. - The orientation of this coordinate system (right-handed or left-handed) is not modified. Raises ConstructionError if the "Direction" of <theA1> and the "XDirection" of <me> are parallel (same or opposite orientation) because it is impossible to calculate the new "XDirection" and the new "YDirection". | |
| void | SetDirection (GDir theV) |
| Changes the main direction of this coordinate system, then recomputes its "X Direction" and "Y Direction". Note: - The new "X Direction" is computed as follows: new "X Direction" = theV ^ (previous "X Direction" ^ theV). - The orientation of this coordinate system (left- or right-handed) is not modified. Raises ConstructionError if <theV> and the previous "XDirection" are parallel because it is impossible to calculate the new "XDirection" and the new "YDirection". | |
| void | SetLocation (GPnt theP) |
| Changes the "Location" point (origin) of <me>. | |
| void | SetXDirection (GDir theVx) |
| Changes the "Xdirection" of <me>. The main direction "Direction" is not modified, the "Ydirection" is modified. If <theVx> is not normal to the main direction then <XDirection> is computed as follows XDirection = Direction ^ (theVx ^ Direction). Raises ConstructionError if <theVx> is parallel (same or opposite orientation) to the main direction of <me> | |
| void | SetYDirection (GDir theVy) |
| Changes the "Ydirection" of <me>. The main direction is not modified but the "Xdirection" is changed. If <theVy> is not normal to the main direction then "YDirection" is computed as follows YDirection = Direction ^ (<theVy> ^ Direction). Raises ConstructionError if <theVy> is parallel to the main direction of <me> | |
| double | Angle (GAx3 theOther) |
| Computes the angular value between the main direction of <me> and the main direction of <theOther>. Returns the angle between 0 and PI in radians. | |
| GAx1 | Axis () |
| Returns the main axis of <me>. It is the "Location" point and the main "Direction". | |
| GAx2 | Ax2 () |
| Computes a right-handed coordinate system with the same "X Direction" and "Y Direction" as those of this coordinate system, then recomputes the "main Direction". If this coordinate system is right-handed, the result returned is the same coordinate system. If this coordinate system is left-handed, the result is reversed. | |
| GDir | Direction () |
| Returns the main direction of <me>. | |
| GPnt | Location () |
| Returns the "Location" point (origin) of <me>. | |
| GDir | XDirection () |
| Returns the "XDirection" of <me>. | |
| GDir | YDirection () |
| Returns the "YDirection" of <me>. | |
| bool | Direct () |
| Returns True if the coordinate system is right-handed. i.e. XDirection().Crossed(YDirection()).Dot(Direction()) > 0 | |
| bool | IsCoplanar (GAx3 theOther, double theLinearTolerance, double theAngularTolerance) |
| Returns True if . the distance between the "Location" point of <me> and <theOther> is lower or equal to theLinearTolerance and . the distance between the "Location" point of <theOther> and <me> is lower or equal to theLinearTolerance and . the main direction of <me> and the main direction of <theOther> are parallel (same or opposite orientation). | |
| bool | IsCoplanar (GAx1 theA1, double theLinearTolerance, double theAngularTolerance) |
| Returns True if . the distance between <me> and the "Location" point of theA1 is lower of equal to theLinearTolerance and . the distance between theA1 and the "Location" point of <me> is lower or equal to theLinearTolerance and . the main direction of <me> and the direction of theA1 are normal. | |
| void | Mirror (GPnt theP) |
| GAx3 | Mirrored (GPnt theP) |
| Performs the symmetrical transformation of an axis placement with respect to the point theP which is the center of the symmetry. Warnings : The main direction of the axis placement is not changed. The "XDirection" and the "YDirection" are reversed. So the axis placement stay right handed. | |
| void | Mirror (GAx1 theA1) |
| GAx3 | Mirrored (GAx1 theA1) |
| Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry. The transformation is performed on the "Location" point, on the "XDirection" and "YDirection". The resulting main "Direction" is the cross product between the "XDirection" and the "YDirection" after transformation. | |
| void | Mirror (GAx2 theA2) |
| GAx3 | Mirrored (GAx2 theA2) |
| Performs the symmetrical transformation of an axis placement with respect to a plane. The axis placement <theA2> locates the plane of the symmetry : (Location, XDirection, YDirection). The transformation is performed on the "Location" point, on the "XDirection" and "YDirection". The resulting main "Direction" is the cross product between the "XDirection" and the "YDirection" after transformation. | |
| void | Rotate (GAx1 theA1, double theAng) |
| GAx3 | Rotated (GAx1 theA1, double theAng) |
| Rotates an axis placement. <theA1> is the axis of the rotation . theAng is the angular value of the rotation in radians. | |
| void | Scale (GPnt theP, double theS) |
| GAx3 | Scaled (GPnt theP, double theS) |
| Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. Warnings : If the scale <theS> is negative : . the main direction of the axis placement is not changed. . The "XDirection" and the "YDirection" are reversed. So the axis placement stay right handed. | |
| void | Transform (GTrsf theT) |
| GAx3 | Transformed (GTrsf theT) |
| Transforms an axis placement with a Trsf. The "Location" point, the "XDirection" and the "YDirection" are transformed with theT. The resulting main "Direction" of <me> is the cross product between the "XDirection" and the "YDirection" after transformation. | |
| void | Translate (GVec theV) |
| GAx3 | Translated (GVec theV) |
| Translates an axis plaxement in the direction of the vector <theV>. The magnitude of the translation is the vector's magnitude. | |
| void | Translate (GPnt theP1, GPnt theP2) |
| GAx3 | Translated (GPnt theP1, GPnt theP2) |
| Translates an axis placement from the point <theP1> to the point <theP2>. | |
| GAx3 | Clone () |
| GTrsf | ToTrsf () |
Describes a coordinate system in 3D space. Unlike a gp_Ax2 coordinate system, a gp_Ax3 can be right-handed ("direct sense") or left-handed ("indirect sense"). A coordinate system is defined by: - its origin (also referred to as its "Location point"), and - three orthogonal unit vectors, termed the "X Direction", the "Y Direction" and the "Direction" (also referred to as the "main Direction"). The "Direction" of the coordinate system is called its "main Direction" because whenever this unit vector is modified, the "X Direction" and the "Y Direction" are recomputed. However, when we modify either the "X Direction" or the "Y Direction", "Direction" is not modified. "Direction" is also the "Z Direction". The "main Direction" is always parallel to the cross product of its "X Direction" and "Y Direction". If the coordinate system is right-handed, it satisfies the equation: "main Direction" = "X Direction" ^ "Y Direction" and if it is left-handed, it satisfies the equation: "main Direction" = -"X Direction" ^ "Y Direction" A coordinate system is used: - to describe geometric entities, in particular to position them. The local coordinate system of a geometric entity serves the same purpose as the STEP function "axis placement three axes", or - to define geometric transformations. Note: - We refer to the "X Axis", "Y Axis" and "Z Axis", respectively, as the axes having: - the origin of the coordinate system as their origin, and - the unit vectors "X Direction", "Y Direction" and "main Direction", respectively, as their unit vectors. - The "Z Axis" is also the "main Axis". - gp_Ax2 is used to define a coordinate system that must be always right-handed.
三维坐标系