gp
OCCT package gp: gp, gp_Ax1, gp_Ax2, gp_Ax22d, and 36 more bound classes.
gp
The geometric processor package, called gp, provides an implementation of entities used: . for algebraic calculation such as "XYZ" coordinates, "Mat" matrix . for basis analytic geometry such as Transformations, point, vector, line, plane, axis placement, conics, and elementary surfaces. These entities are defined in 2d and 3d space. All the classes of this package are non-persistent. This is a utility class that cannot be instantiated.
Static methods(16)
- Resolution(): number
Method of package gp.
In geometric computations, defines the tolerance criterion used to determine when two numbers can be considered equal. Many class functions use this tolerance criterion, for example, to avoid division by zero in geometric computations. In the documentation, tolerance criterion is always referred to asgp::Resolution(). Identifies a Cartesian point with coordinates X = Y = Z = 0.0.0.
Returns a unit vector with the combination (1,0,0).
Returns a unit vector with the combination (0,1,0).
Returns a unit vector with the combination (0,0,1).
Identifies an axis where its origin is Origin and its unit vector coordinates X = 1.0, Y = Z = 0.0.
Identifies an axis where its origin is Origin and its unit vector coordinates Y = 1.0, X = Z = 0.0.
Identifies an axis where its origin is Origin and its unit vector coordinates Z = 1.0, Y = X = 0.0.
Identifies a coordinate system where its origin is Origin, and its "main Direction" and "X Direction" coordinates Z = 1.0, X = Y =0.0 and X direction coordinates X = 1.0, Y = Z = 0.0.
Identifies a coordinate system where its origin is Origin, and its "main Direction" and "X Direction" coordinates Y = 1.0, X = Z =0.0 and X direction coordinates Z = 1.0, X = Y = 0.0.
Identifies a coordinate system where its origin is Origin, and its "main Direction" and "X Direction" coordinates X = 1.0, Z = Y =0.0 and X direction coordinates Y = 1.0, X = Z = 0.0 In 2D space.
Identifies a Cartesian point with coordinates X = Y = 0.0.
Returns a unit vector with the combinations (1,0).
Returns a unit vector with the combinations (0,1).
Identifies an axis where its origin is Origin2d and its unit vector coordinates are: X = 1.0, Y = 0.0.
Identifies an axis where its origin is Origin2d and its unit vector coordinates are Y = 1.0, X = 0.0.
gp_Ax1
Describes an axis in 3D space. An axis is defined by:
- its origin (also referred to as its "Location point"), and
- its unit vector (referred to as its "Direction" or "main Direction"). An axis is used:
- to describe 3D geometric entities (for example, the axis of a revolution entity). It serves the same purpose as the STEP function "axis placement one axis", or
- to define geometric transformations (axis of symmetry, axis of rotation, and so on). For example, this entity can be used to locate a geometric entity or to define a symmetry axis.
Constructors(4)
Creates an axis object representing Z axis of the reference coordinate system.
- constructor(theDir: gp_Dir_D): gp_Ax1
Creates an axis at the origin with the given standard direction. Replaces
gp::OX(),gp::OY(),gp::OZ()static functions.Parameters (1)theDir
- constructor(theP: gp_Pnt, theV: gp_Dir): gp_Ax1
P is the location point and V is the direction of <me>.
Parameters (2)thePtheV
- constructor(theP: gp_Pnt, theDir: gp_Dir_D): gp_Ax1
Creates an axis with the given location point and standard direction.
Parameters (2)thePtheDir
Instance methods(27)
- SetDirection(theV: gp_Dir): void
Assigns V as the "Direction" of this axis.
Parameters (1)theV
- SetLocation(theP: gp_Pnt): void
Assigns P as the origin of this axis.
Parameters (1)theP
Returns the direction of <me>.
Returns the location point of <me>.
Returns True if: . the angle between <me> and <Other> is lower or equal to <AngularTolerance> and . the distance between <me>.
Location()and <Other> is lower or equal to <LinearTolerance> and . the distance between <Other>.Location()and <me> is lower or equal to LinearTolerance.Parameters (3)OtherAngularToleranceLinearTolerance
Returns True if the direction of this and another axis are normal to each other. That is, if the angle between the two axes is equal to Pi/2. Note: the tolerance criterion is given by theAngularTolerance.
Parameters (2)theOthertheAngularTolerance
- IsOpposite(theOther: gp_Ax1, theAngularTolerance: number): boolean
Returns True if the direction of this and another axis are parallel with opposite orientation. That is, if the angle between the two axes is equal to Pi. Note: the tolerance criterion is given by theAngularTolerance.
Parameters (2)theOthertheAngularTolerance
- IsParallel(theOther: gp_Ax1, theAngularTolerance: number): boolean
Returns True if the direction of this and another axis are parallel with same orientation or opposite orientation. That is, if the angle between the two axes is equal to 0 or Pi. Note: the tolerance criterion is given by theAngularTolerance.
Parameters (2)theOthertheAngularTolerance
Computes the angular value, in radians, between this.Direction() and theOther.Direction(). Returns the angle between 0 and 2*PI radians.
Parameters (1)theOther
- Reverse(): void
Reverses the unit vector of this axis and assigns the result to this axis.
Reverses the unit vector of this axis and creates a new one.
Performs the symmetrical transformation of an axis placement with respect to the point P which is the center of the symmetry and assigns the result to this axis.
Parameters (1)P
Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry and assigns the result to this axis.
Parameters (1)A1
Performs the symmetrical transformation of an axis placement with respect to a plane. The axis placement <A2> locates the plane of the symmetry : (Location, XDirection, YDirection) and assigns the result to this axis.
Parameters (1)A2
Performs the symmetrical transformation of an axis placement with respect to the point P which is the center of the symmetry and creates a new axis.
Parameters (1)P
Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry and creates a new axis.
Parameters (1)A1
Performs the symmetrical transformation of an axis placement with respect to a plane. The axis placement <A2> locates the plane of the symmetry : (Location, XDirection, YDirection) and creates a new axis.
Parameters (1)A2
Rotates this axis at an angle theAngRad (in radians) about the axis theA1 and assigns the result to this axis.
Parameters (2)theA1theAngRad
Rotates this axis at an angle theAngRad (in radians) about the axis theA1 and creates a new one.
Parameters (2)theA1theAngRad
Applies a scaling transformation to this axis with:
- scale factor theS, and
- center theP and assigns the result to this axis.
Parameters (2)thePtheS
Applies a scaling transformation to this axis with:
- scale factor theS, and
- center theP and creates a new axis.
Parameters (2)thePtheS
Applies the transformation theT to this axis and assigns the result to this axis.
Parameters (1)theT
- Transformed(theT: gp_Trsf): gp_Ax1
Applies the transformation theT to this axis and creates a new one.
Translates an axis plaxement in the direction of the vector <V>. The magnitude of the translation is the vector's magnitude.Parameters (1)theT
Translates this axis by the vector theV, and assigns the result to this axis.
Parameters (1)theV
Translates this axis by: the vector (theP1, theP2) defined from point theP1 to point theP2. and assigns the result to this axis.
Parameters (2)theP1theP2
- Translated(theV: gp_Vec): gp_Ax1
Translates this axis by the vector theV, and creates a new one.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Ax1
Translates this axis by: the vector (theP1, theP2) defined from point theP1 to point theP2. and creates a new one.
Parameters (2)theP1theP2
gp_Ax2
Describes a right-handed coordinate system in 3D space. A coordinate system is defined by:
- its origin (also referred to as its "Location point"), and
- three orthogonal unit vectors, termed respectively 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. The "main Direction" is also the "Z Direction".
Since an Ax2 coordinate system is right-handed, its "main Direction" is always equal to the cross product of its "X Direction" and "Y Direction". (To define a left-handed coordinate system, usegp_Ax3.) 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 two axes", or
- to define geometric transformations. Note: we refer to the "X Axis", "Y Axis" and "Z Axis", respectively, as to 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".
Constructors(6)
Creates an object corresponding to the reference coordinate system (OXYZ).
- constructor(theV: gp_Dir_D): gp_Ax2
Creates a coordinate system at the origin with the given standard main direction. Replaces
gp::XOY(),gp::YOZ(),gp::ZOX()static functions.Parameters (1)theV
- constructor(P: gp_Pnt, V: gp_Dir): gp_Ax2
Creates a coordinate system with an origin P, where V gives the "main Direction" (here, "X Direction" and "Y Direction" are defined automatically).
Parameters (2)PV
- constructor(theP: gp_Pnt, theV: gp_Dir_D): gp_Ax2
Creates a coordinate system with an origin P and standard main direction.
Parameters (2)thePtheV
- constructor(P: gp_Pnt, N: gp_Dir, Vx: gp_Dir): gp_Ax2
Creates an axis placement with an origin P such that:
- N is the Direction, and
- the "X Direction" is normal to N, in the plane defined by the vectors (N, Vx): "X Direction" = (N ^ Vx) ^ N, Exception: raises ConstructionError if N and Vx are parallel (same or opposite orientation).
Parameters (3)PNVx
- constructor(theP: gp_Pnt, theN: gp_Dir_D, theVx: gp_Dir_D): gp_Ax2
Creates an axis placement with standard directions.
Parameters (3)thePtheNtheVx
Instance methods(29)
Assigns the origin and "main Direction" of the axis A1 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 A1. Exceptions Standard_ConstructionError if A1 is parallel to the "X Direction" of this coordinate system.
Parameters (1)A1
- SetDirection(V: gp_Dir): void
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" = V ^ (previous "X Direction" ^ V) Exceptions Standard_ConstructionError if V is parallel to the "X Direction" of this coordinate system.
Parameters (1)V
- SetLocation(theP: gp_Pnt): void
Changes the "Location" point (origin) of <me>.
Parameters (1)theP
- SetXDirection(theVx: gp_Dir): void
Changes the "Xdirection" of <me>. The main direction "Direction" is not modified, the "Ydirection" is modified. If <Vx> is not normal to the main direction then <XDirection> is computed as follows XDirection = Direction ^ (Vx ^ Direction). Exceptions Standard_ConstructionError if Vx or Vy is parallel to the "main Direction" of this coordinate system.
Parameters (1)theVx
- SetYDirection(theVy: gp_Dir): void
Changes the "Ydirection" of <me>. The main direction is not modified but the "Xdirection" is changed. If <Vy> is not normal to the main direction then "YDirection" is computed as follows YDirection = Direction ^ (<Vy> ^ Direction). Exceptions Standard_ConstructionError if Vx or Vy is parallel to the "main Direction" of this coordinate system.
Parameters (1)theVy
Computes the angular value, in radians, between the main direction of <me> and the main direction of <theOther>. Returns the angle between 0 and PI in radians.
Parameters (1)theOther
Returns the main axis of <me>. It is the "Location" point and the main "Direction".
Returns the main direction of <me>.
Returns the "Location" point (origin) of <me>.
- XDirection(): gp_Dir
Returns the "XDirection" of <me>.
- YDirection(): gp_Dir
Returns the "YDirection" of <me>.
- IsCoplanar(Other: gp_Ax2, LinearTolerance: number, AngularTolerance: number): booleanParameters (3)
OtherLinearToleranceAngularTolerance
- IsCoplanar(A1: gp_Ax1, LinearTolerance: number, AngularTolerance: number): boolean
Returns True if: . the distance between <me> and the "Location" point of A1 is lower of equal to LinearTolerance and . the main direction of <me> and the direction of A1 are normal. Note: the tolerance criterion for angular equality is given by AngularTolerance.
Parameters (3)A1LinearToleranceAngularTolerance
Performs a symmetrical transformation of this coordinate system with respect to:
- the point P, and assigns the result to this coordinate system. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point:
- the main direction of the coordinate system is not changed, and
- the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane:
- the transformation is applied to the "X Direction" and the "Y Direction", then
- the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system.
Parameters (1)P
Performs a symmetrical transformation of this coordinate system with respect to:
- the axis A1, and assigns the result to this coordinate system. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point:
- the main direction of the coordinate system is not changed, and
- the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane:
- the transformation is applied to the "X Direction" and the "Y Direction", then
- the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system.
Parameters (1)A1
Performs a symmetrical transformation of this coordinate system with respect to:
- the plane defined by the origin, "X Direction" and "Y Direction" of coordinate system A2 and assigns the result to this coordinate system. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point:
- the main direction of the coordinate system is not changed, and
- the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane:
- the transformation is applied to the "X Direction" and the "Y Direction", then
- the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system.
Parameters (1)A2
Performs a symmetrical transformation of this coordinate system with respect to:
- the point P, and creates a new one. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point:
- the main direction of the coordinate system is not changed, and
- the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane:
- the transformation is applied to the "X Direction" and the "Y Direction", then
- the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system.
Parameters (1)P
Performs a symmetrical transformation of this coordinate system with respect to:
- the axis A1, and creates a new one. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point:
- the main direction of the coordinate system is not changed, and
- the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane:
- the transformation is applied to the "X Direction" and the "Y Direction", then
- the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system.
Parameters (1)A1
Performs a symmetrical transformation of this coordinate system with respect to:
- the plane defined by the origin, "X Direction" and "Y Direction" of coordinate system A2 and creates a new one. Warning This transformation is always performed on the origin. In case of a reflection with respect to a point:
- the main direction of the coordinate system is not changed, and
- the "X Direction" and the "Y Direction" are simply reversed In case of a reflection with respect to an axis or a plane:
- the transformation is applied to the "X Direction" and the "Y Direction", then
- the "main Direction" is recomputed as the cross product "X Direction" ^ "Y Direction". This maintains the right-handed property of the coordinate system.
Parameters (1)A2
- Parameters (2)
theA1theAng
Rotates an axis placement. <theA1> is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (2)
thePtheS
Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. Warnings: If the scale 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.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Ax2
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.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec): gp_Ax2
Translates an axis plaxement in the direction of the vector <theV>. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Ax2
Translates an axis placement from the point <theP1> to the point <theP2>.
Parameters (2)theP1theP2
gp_Ax22d
Describes a coordinate system in a plane (2D space). A coordinate system is defined by:
- its origin (also referred to as its "Location point"), and
- two orthogonal unit vectors, respectively, called the "X Direction" and the "Y Direction". A
gp_Ax22dmay be right-handed ("direct sense") or left-handed ("inverse" or "indirect sense"). You use agp_Ax22dto: - describe 2D geometric entities, in particular to position them. The local coordinate system of a geometric entity serves for the same purpose as the STEP function "axis placement two axes", or
- define geometric transformations. Note: we refer to the "X Axis" and "Y Axis" as the axes having:
- the origin of the coordinate system as their origin, and
- the unit vectors "X Direction" and "Y Direction", respectively, as their unit vectors.
Constructors(4)
Creates an object representing the reference coordinate system (OXY).
- constructor(theA: gp_Ax2d, theIsSense?: boolean): gp_Ax22d
Creates a coordinate system where its origin is the origin of theA and its "X Direction" is the unit vector of theA, which is:
- right-handed if theIsSense is true (default value), or
- left-handed if theIsSense is false.
Parameters (2)theAtheIsSense
- constructor(theP: gp_Pnt2d, theVx: gp_Dir2d, theVy: gp_Dir2d): gp_Ax22d
Creates a coordinate system with origin theP and where:
- theVx is the "X Direction", and
- the "Y Direction" is orthogonal to theVx and oriented so that the cross products theVx^"Y Direction" and theVx^theVy have the same sign. Raises ConstructionError if theVx and theVy are parallel (same or opposite orientation).
Parameters (3)thePtheVxtheVy
- constructor(theP: gp_Pnt2d, theV: gp_Dir2d, theIsSense?: boolean): gp_Ax22d
Creates a coordinate system with origin theP and "X Direction" theV, which is:
- right-handed if theIsSense is true (default value), or
- left-handed if theIsSense is false
Parameters (3)thePtheVtheIsSense
Instance methods(25)
Assigns the origin and the two unit vectors of the coordinate system theA1 to this coordinate system.
Parameters (1)theA1
Changes the XAxis and YAxis ("Location" point and "Direction") of <me>. The "YDirection" is recomputed in the same sense as before.
Parameters (1)theA1
Changes the XAxis and YAxis ("Location" point and "Direction") of <me>. The "XDirection" is recomputed in the same sense as before.
Parameters (1)theA1
- SetLocation(theP: gp_Pnt2d): void
Changes the "Location" point (origin) of <me>.
Parameters (1)theP
- SetXDirection(theVx: gp_Dir2d): void
Assigns theVx to the "X Direction" of this coordinate system. The other unit vector of this coordinate system is recomputed, normal to theVx , without modifying the orientation (right-handed or left-handed) of this coordinate system.
Parameters (1)theVx
- SetYDirection(theVy: gp_Dir2d): void
Assigns theVy to the "Y Direction" of this coordinate system. The other unit vector of this coordinate system is recomputed, normal to theVy, without modifying the orientation (right-handed or left-handed) of this coordinate system.
Parameters (1)theVy
Returns an axis, for which.
- the origin is that of this coordinate system, and
- the unit vector is either the "X Direction" of this coordinate system. Note: the result is the "X Axis" of this coordinate system.
Returns an axis, for which.
- the origin is that of this coordinate system, and
- the unit vector is either the "Y Direction" of this coordinate system. Note: the result is the "Y Axis" of this coordinate system.
Returns the "Location" point (origin) of <me>.
Returns the "XDirection" of <me>.
Returns the "YDirection" of <me>.
- Parameters (1)
theP
- Parameters (1)
theA
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.
Parameters (1)theP
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.
Parameters (1)theA
- Parameters (2)
thePtheAng
Rotates an axis placement. <theA1> is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)thePtheAng
- Parameters (2)
thePtheS
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.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf2d): gp_Ax22d
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.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec2d): gp_Ax22d
Translates an axis plaxement in the direction of the vector <theV>. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Ax22d
Translates an axis placement from the point <theP1> to the point <theP2>.
Parameters (2)theP1theP2
gp_Ax2d
Describes an axis in the plane (2D space). An axis is defined by:
- its origin (also referred to as its "Location point"), and
- its unit vector (referred to as its "Direction"). An axis implicitly defines a direct, right-handed coordinate system in 2D space by:
- its origin,
- its "Direction" (giving the "X Direction" of the coordinate system), and
- the unit vector normal to "Direction" (positive angle measured in the trigonometric sense). An axis is used:
- to describe 2D geometric entities (for example, the axis which defines angular coordinates on a circle). It serves for the same purpose as the STEP function "axis placement one axis", or
- to define geometric transformations (axis of symmetry, axis of rotation, and so on). Note: to define a left-handed 2D coordinate system, use
gp_Ax22d.
Constructors(4)
Creates an axis object representing X axis of the reference coordinate system.
- constructor(theDir: gp_Dir2d_D): gp_Ax2d
Creates an axis at the origin with the given standard direction. Replaces
gp::OX2d(),gp::OY2d()static functions.Parameters (1)theDir
- constructor(theP: gp_Pnt2d, theV: gp_Dir2d): gp_Ax2d
Creates an Ax2d. <theP> is the "Location" point of the axis placement and theV is the "Direction" of the axis placement.
Parameters (2)thePtheV
- constructor(theP: gp_Pnt2d, theDir: gp_Dir2d_D): gp_Ax2d
Creates an axis with the given location point and standard direction.
Parameters (2)thePtheDir
Instance methods(25)
- SetLocation(theP: gp_Pnt2d): void
Changes the "Location" point (origin) of <me>.
Parameters (1)theP
- SetDirection(theV: gp_Dir2d): void
Changes the direction of <me>.
Parameters (1)theV
Returns the origin of <me>.
Returns the direction of <me>.
Returns True if: . the angle between <me> and <Other> is lower or equal to <AngularTolerance> and . the distance between <me>.
Location()and <Other> is lower or equal to <LinearTolerance> and . the distance between <Other>.Location()and <me> is lower or equal to LinearTolerance.Parameters (3)OtherAngularToleranceLinearTolerance
Returns true if this axis and the axis theOther are normal to each other. That is, if the angle between the two axes is equal to Pi/2 or -Pi/2. Note: the tolerance criterion is given by theAngularTolerance.
Parameters (2)theOthertheAngularTolerance
- IsOpposite(theOther: gp_Ax2d, theAngularTolerance: number): boolean
Returns true if this axis and the axis theOther are parallel, and have opposite orientations. That is, if the angle between the two axes is equal to Pi or -Pi. Note: the tolerance criterion is given by theAngularTolerance.
Parameters (2)theOthertheAngularTolerance
- IsParallel(theOther: gp_Ax2d, theAngularTolerance: number): boolean
Returns true if this axis and the axis theOther are parallel, and have either the same or opposite orientations. That is, if the angle between the two axes is equal to 0, Pi or -Pi. Note: the tolerance criterion is given by theAngularTolerance.
Parameters (2)theOthertheAngularTolerance
Computes the angle, in radians, between this axis and the axis theOther. The value of the angle is between -Pi and Pi.
Parameters (1)theOther
- Reverse(): void
Reverses the direction of <me> and assigns the result to this axis.
Computes a new axis placement with a direction opposite to the direction of <me>.
- Parameters (1)
P
- Parameters (1)
A
Performs the symmetrical transformation of an axis placement with respect to the point P which is the center of the symmetry.
Parameters (1)P
Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry.
Parameters (1)A
- Parameters (2)
thePtheAng
Rotates an axis placement. <theP> is the center of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)thePtheAng
- Parameters (2)
PS
Applies a scaling transformation on the axis placement. The "Location" point of the axisplacement is modified. The "Direction" is reversed if the scale is negative.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf2d): gp_Ax2d
Transforms an axis placement with a Trsf.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec2d): gp_Ax2d
Translates an axis placement in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Ax2d
Translates an axis placement from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Ax3
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_Ax2is used to define a coordinate system that must be always right-handed.
Constructors(7)
Creates an object corresponding to the reference coordinate system (OXYZ).
- constructor(theA: gp_Ax2): gp_Ax3
Creates a coordinate system from a right-handed coordinate system.
Parameters (1)theA
- constructor(theV: gp_Dir_D): gp_Ax3
Creates an axis placement at the origin with the given standard direction.
Parameters (1)theV
- constructor(theP: gp_Pnt, theV: gp_Dir): gp_Ax3
Creates an axis placement with the "Location" point <theP> and the normal direction <theV>.
Parameters (2)thePtheV
- constructor(theP: gp_Pnt, theV: gp_Dir_D): gp_Ax3
Creates an axis placement with the given location point and standard direction.
Parameters (2)thePtheV
- constructor(theP: gp_Pnt, theN: gp_Dir, theVx: gp_Dir): gp_Ax3
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).
Parameters (3)thePtheNtheVx
- constructor(theP: gp_Pnt, theN: gp_Dir_D, theVx: gp_Dir_D): gp_Ax3
Creates an axis placement with standard directions. This constructor allows constexpr and noexcept construction when using standard directions.
Parameters (3)thePtheNtheVx
Instance methods(34)
- XReverse(): void
Reverses the X direction of <me>.
- YReverse(): void
Reverses the Y direction of <me>.
- ZReverse(): void
Reverses the Z direction of <me>.
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".
Parameters (1)theA1
- SetDirection(theV: gp_Dir): void
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".
Parameters (1)theV
- SetLocation(theP: gp_Pnt): void
Changes the "Location" point (origin) of <me>.
Parameters (1)theP
- SetXDirection(theVx: gp_Dir): void
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>.
Parameters (1)theVx
- SetYDirection(theVy: gp_Dir): void
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>.
Parameters (1)theVy
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.
Parameters (1)theOther
Returns the main axis of <me>. It is the "Location" point and the main "Direction".
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.
Returns the main direction of <me>.
Returns the "Location" point (origin) of <me>.
- XDirection(): gp_Dir
Returns the "XDirection" of <me>.
- YDirection(): gp_Dir
Returns the "YDirection" of <me>.
- Direct(): boolean
Returns True if the coordinate system is right-handed. i.e.
XDirection().Crossed(YDirection()).Dot(Direction()) > 0. - IsCoplanar(theOther: gp_Ax3, theLinearTolerance: number, theAngularTolerance: number): boolean
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).
Parameters (3)theOthertheLinearTolerancetheAngularTolerance
- IsCoplanar(theA1: gp_Ax1, theLinearTolerance: number, theAngularTolerance: number): boolean
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.
Parameters (3)theA1theLinearTolerancetheAngularTolerance
- Parameters (1)
theP
- Parameters (1)
theA1
- Parameters (1)
theA2
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.
Parameters (1)theP
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.
Parameters (1)theA1
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.
Parameters (1)theA2
- Parameters (2)
theA1theAng
Rotates an axis placement. <theA1> is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (2)
thePtheS
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.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Ax3
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.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec): gp_Ax3
Translates an axis plaxement in the direction of the vector <theV>. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Ax3
Translates an axis placement from the point <theP1> to the point <theP2>.
Parameters (2)theP1theP2
gp_Circ
Describes a circle in 3D space. A circle is defined by its radius and positioned in space with a coordinate system (a gp_Ax2 object) as follows:
- the origin of the coordinate system is the center of the circle, and
- the origin, "X Direction" and "Y Direction" of the coordinate system define the plane of the circle. This positioning coordinate system is the "local coordinate system" of the circle. Its "main Direction" gives the normal vector to the plane of the circle. The "main Axis" of the coordinate system is referred to as the "Axis" of the circle. Note: when a
gp_Circcircle is converted into aGeom_Circlecircle, some implicit properties of the circle are used explicitly: - the "main Direction" of the local coordinate system gives an implicit orientation to the circle (and defines its trigonometric sense),
- this orientation corresponds to the direction in which parameter values increase,
- the starting point for parameterization is that of the "X Axis" of the local coordinate system (i.e. the "X Axis" of the circle). See Also
gce_MakeCircwhich provides functions for more complex circle constructionsGeom_Circlewhich provides additional functions for constructing circles and works, in particular, with the parametric equations of circles
Constructors(2)
Creates an indefinite circle.
- constructor(theA2: gp_Ax2, theRadius: number): gp_Circ
A2 locates the circle and gives its orientation in 3D space. Warnings: It is not forbidden to create a circle with theRadius = 0.0 Raises ConstructionError if theRadius < 0.0.
Parameters (2)theA2theRadius
Instance methods(31)
Changes the main axis of the circle. It is the axis perpendicular to the plane of the circle. Raises ConstructionError if the direction of theA1 is parallel to the "XAxis" of the circle.
Parameters (1)theA1
- SetLocation(theP: gp_Pnt): void
Changes the "Location" point (center) of the circle.
Parameters (1)theP
- SetPosition(theA2: gp_Ax2): void
Changes the position of the circle.
Parameters (1)theA2
- SetRadius(theRadius: number): void
Modifies the radius of this circle. Warning: This class does not prevent the creation of a circle where theRadius is null. Exceptions Standard_ConstructionError if theRadius is negative.
Parameters (1)theRadius
- Area(): number
Computes the area of the circle.
Returns the main axis of the circle. It is the axis perpendicular to the plane of the circle, passing through the "Location" point (center) of the circle.
- Length(): number
Computes the circumference of the circle.
Returns the center of the circle. It is the "Location" point of the local coordinate system of the circle.
Returns the position of the circle. It is the local coordinate system of the circle.
- Radius(): number
Returns the radius of this circle.
Returns the "XAxis" of the circle. This axis is perpendicular to the axis of the conic. This axis and the "Yaxis" define the plane of the conic.
Returns the "YAxis" of the circle. This axis and the "Xaxis" define the plane of the conic. The "YAxis" is perpendicular to the "Xaxis".
Computes the minimum of distance between the point theP and any point on the circumference of the circle.
Parameters (1)theP
- SquareDistance(theP: gp_Pnt): number
Computes the square distance between <me> and the point theP.
Parameters (1)theP
Returns True if the point theP is on the circumference. The distance between <me> and <theP> must be lower or equal to theLinearTolerance.
Parameters (2)thePtheLinearTolerance
- Parameters (1)
theP
- Parameters (1)
theA1
- Parameters (1)
theA2
Performs the symmetrical transformation of a circle with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
Performs the symmetrical transformation of a circle with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
Performs the symmetrical transformation of a circle with respect to a plane. The axis placement theA2 locates the plane of the of the symmetry : (Location, XDirection, YDirection).
Parameters (1)theA2
- Parameters (2)
theA1theAng
Rotates a circle. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (2)
thePtheS
Scales a circle. theS is the scaling value. Warnings : If theS is negative the radius stay positive but the "XAxis" and the "YAxis" are reversed as for an ellipse.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Circ
Transforms a circle with the transformation theT from class Trsf.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec): gp_Circ
Translates a circle in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Circ
Translates a circle from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Circ2d
Describes a circle in the plane (2D space). A circle is defined by its radius and positioned in the plane with a coordinate system (a gp_Ax22d object) as follows:
- the origin of the coordinate system is the center of the circle, and
- the orientation (direct or indirect) of the coordinate system gives an implicit orientation to the circle (and defines its trigonometric sense). This positioning coordinate system is the "local coordinate system" of the circle. Note: when a
gp_Circ2dcircle is converted into aGeom2d_Circlecircle, some implicit properties of the circle are used explicitly: - the implicit orientation corresponds to the direction in which parameter values increase,
- the starting point for parameterization is that of the "X Axis" of the local coordinate system (i.e. the "X Axis" of the circle). See Also GccAna and
Geom2dGccpackages which provide functions for constructing circles defined by geometric constraintsgce_MakeCirc2dwhich provides functions for more complex circle constructionsGeom2d_Circlewhich provides additional functions for constructing circles and works, with the parametric equations of circles in particulargp_Ax22d
Constructors(3)
creates an indefinite circle.
- constructor(theAxis: gp_Ax22d, theRadius: number): gp_Circ2d
theAxis defines the Xaxis and Yaxis of the circle which defines the origin and the sense of parametrization. The location point of theAxis is the center of the circle. Warnings: It is not forbidden to create a circle with theRadius = 0.0 Raises ConstructionError if theRadius < 0.0.
Parameters (2)theAxistheRadius
- constructor(theXAxis: gp_Ax2d, theRadius: number, theIsSense?: boolean): gp_Circ2d
The location point of theXAxis is the center of the circle. Warnings: It is not forbidden to create a circle with theRadius = 0.0 Raises ConstructionError if theRadius < 0.0.
Parameters (3)theXAxistheRadiustheIsSense
Instance methods(34)
- SetLocation(theP: gp_Pnt2d): void
Changes the location point (center) of the circle.
Parameters (1)theP
Changes the X axis of the circle.
Parameters (1)theA
Changes the X axis of the circle.
Parameters (1)theA
Changes the Y axis of the circle.
Parameters (1)theA
- SetRadius(theRadius: number): void
Modifies the radius of this circle. This class does not prevent the creation of a circle where theRadius is null. Exceptions Standard_ConstructionError if theRadius is negative.
Parameters (1)theRadius
- Area(): number
Computes the area of the circle.
- Coefficients(theA: number, theB: number, theC: number, theD: number, theE: number, theF: number): { theA: number; theB: number; theC: number; theD: number; theE: number; theF: number }
Returns the normalized coefficients from the implicit equation of the circle : theA * (X2) + theB * (Y2) + 2theC(XY) + 2theDX + 2theE*Y + theF = 0.0.
Parameters (6)theAtheBtheCtheDtheEtheF
ReturnsA result object with fields:
theA: updated value from the call.theB: updated value from the call.theC: updated value from the call.theD: updated value from the call.theE: updated value from the call.theF: updated value from the call.
Does <me> contain theP ? Returns True if the distance between theP and any point on the circumference of the circle is lower of equal to <theLinearTolerance>.
Parameters (2)thePtheLinearTolerance
Computes the minimum of distance between the point theP and any point on the circumference of the circle.
Parameters (1)theP
- SquareDistance(theP: gp_Pnt2d): number
Computes the square distance between <me> and the point theP.
Parameters (1)theP
- Length(): number
computes the circumference of the circle.
Returns the location point (center) of the circle.
- Radius(): number
Returns the radius value of the circle.
returns the position of the circle.
returns the position of the circle. Idem Axis(me).
returns the X axis of the circle.
Returns the Y axis of the circle. Reverses the direction of the circle.
- Reverse(): void
Reverses the orientation of the local coordinate system of this circle (the "Y Direction" is reversed) and therefore changes the implicit orientation of this circle. Reverse assigns the result to this circle,.
Reverses the orientation of the local coordinate system of this circle (the "Y Direction" is reversed) and therefore changes the implicit orientation of this circle. Reversed creates a new circle.
- IsDirect(): boolean
Returns true if the local coordinate system is direct and false in the other case.
- Parameters (1)
theP
- Parameters (1)
theA
Performs the symmetrical transformation of a circle with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
Performs the symmetrical transformation of a circle with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA
- Parameters (2)
thePtheAng
Rotates a circle. theP is the center of the rotation. Ang is the angular value of the rotation in radians.
Parameters (2)thePtheAng
- Parameters (2)
thePtheS
Scales a circle. theS is the scaling value. Warnings: If theS is negative the radius stay positive but the "XAxis" and the "YAxis" are reversed as for an ellipse.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf2d): gp_Circ2d
Transforms a circle with the transformation theT from class Trsf2d.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec2d): gp_Circ2d
Translates a circle in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Circ2d
Translates a circle from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Cone
Defines an infinite conical surface. A cone is defined by its half-angle (can be negative) at the apex and positioned in space with a coordinate system (a gp_Ax3 object) and a "reference radius" where:
- the "main Axis" of the coordinate system is the axis of revolution of the cone,
- the plane defined by the origin, the "X Direction" and the "Y Direction" of the coordinate system is the reference plane of the cone; the intersection of the cone with this reference plane is a circle of radius equal to the reference radius, if the half-angle is positive, the apex of the cone is on the negative side of the "main Axis" of the coordinate system. If the half-angle is negative, the apex is on the positive side. This coordinate system is the "local coordinate system" of the cone.
Note: when agp_Conecone is converted into aGeom_ConicalSurfacecone, some implicit properties of its local coordinate system are used explicitly: - its origin, "X Direction", "Y Direction" and "main Direction" are used directly to define the parametric directions on the cone and the origin of the parameters,
- its implicit orientation (right-handed or left-handed) gives the orientation (direct or indirect) of the
Geom_ConicalSurfacecone. See Alsogce_MakeConewhich provides functions for more complex cone constructionsGeom_ConicalSurfacewhich provides additional functions for constructing cones and works, in particular, with the parametric equations of conesgp_Ax3
Constructors(2)
Creates an indefinite Cone.
- constructor(theA3: gp_Ax3, theAng: number, theRadius: number): gp_Cone
Creates an infinite conical surface. theA3 locates the cone in the space and defines the reference plane of the surface. Ang is the conical surface semi-angle. Its absolute value is in range ]0, PI/2[. theRadius is the radius of the circle in the reference plane of the cone. theRaises ConstructionError.
- if theRadius is lower than 0.0
- std::abs(theAng) < Resolution from gp or std::abs(theAng) >= (PI/2) - Resolution.
Parameters (3)theA3theAngtheRadius
Instance methods(33)
Changes the symmetry axis of the cone. Raises ConstructionError the direction of theA1 is parallel to the "XDirection" of the coordinate system of the cone.
Parameters (1)theA1
- SetLocation(theLoc: gp_Pnt): void
Changes the location of the cone.
Parameters (1)theLoc
- SetPosition(theA3: gp_Ax3): void
Changes the local coordinate system of the cone. This coordinate system defines the reference plane of the cone.
Parameters (1)theA3
- SetRadius(theR: number): void
Changes the radius of the cone in the reference plane of the cone. Raised if theR < 0.0.
Parameters (1)theR
- SetSemiAngle(theAng: number): void
Changes the semi-angle of the cone. Semi-angle can be negative. Its absolute value std::abs(theAng) is in range ]0,PI/2[. Raises ConstructionError if std::abs(theAng) < Resolution from gp or std::abs(theAng) >= PI/2.
- Resolution
Parameters (1)theAng
Computes the cone's top. The Apex of the cone is on the negative side of the symmetry axis of the cone.
- UReverse(): void
Reverses the U parametrization of the cone reversing the YAxis.
- VReverse(): void
Reverses the V parametrization of the cone reversing the ZAxis.
- Direct(): boolean
Returns true if the local coordinate system of this cone is right-handed.
returns the symmetry axis of the cone.
- Coefficients(theA1: number, theA2: number, theA3: number, theB1: number, theB2: number, theB3: number, theC1: number, theC2: number, theC3: number, theD: number): { theA1: number; theA2: number; theA3: number; theB1: number; theB2: number; theB3: number; theC1: number; theC2: number; theC3: number; theD: number }
Computes the coefficients of the implicit equation of the quadric in the absolute cartesian coordinates system : theA1.X2 + theA2.Y2 + theA3.Z**2 + 2.(theB1.X.Y + theB2.X.Z + theB3.Y.Z) + 2.(theC1.X + theC2.Y + theC3.Z) + theD = 0.0.
Parameters (10)theA1theA2theA3theB1theB2theB3theC1theC2theC3theD
ReturnsA result object with fields:
theA1: updated value from the call.theA2: updated value from the call.theA3: updated value from the call.theB1: updated value from the call.theB2: updated value from the call.theB3: updated value from the call.theC1: updated value from the call.theC2: updated value from the call.theC3: updated value from the call.theD: updated value from the call.
returns the "Location" point of the cone.
Returns the local coordinates system of the cone.
- RefRadius(): number
Returns the radius of the cone in the reference plane.
- SemiAngle(): number
Returns the half-angle at the apex of this cone. Attention! Semi-angle can be negative.
Returns the XAxis of the reference plane.
Returns the YAxis of the reference plane.
- Parameters (1)
theP
- Parameters (1)
theA1
- Parameters (1)
theA2
Performs the symmetrical transformation of a cone with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
Performs the symmetrical transformation of a cone with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
Performs the symmetrical transformation of a cone with respect to a plane. The axis placement theA2 locates the plane of the of the symmetry : (Location, XDirection, YDirection).
Parameters (1)theA2
- Parameters (2)
theA1theAng
Rotates a cone. theA1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (2)
thePtheS
Scales a cone. theS is the scaling value. The absolute value of theS is used to scale the cone.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Cone
Transforms a cone with the transformation theT from class Trsf.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec): gp_Cone
Translates a cone in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Cone
Translates a cone from the point P1 to the point P2.
Parameters (2)theP1theP2
gp_Cylinder
Describes an infinite cylindrical surface. A cylinder is defined by its radius and positioned in space with a coordinate system (a gp_Ax3 object), the "main Axis" of which is the axis of the cylinder. This coordinate system is the "local coordinate system" of the cylinder. Note: when a gp_Cylinder cylinder is converted into a Geom_CylindricalSurface cylinder, some implicit properties of its local coordinate system are used explicitly:
- its origin, "X Direction", "Y Direction" and "main Direction" are used directly to define the parametric directions on the cylinder and the origin of the parameters,
- its implicit orientation (right-handed or left-handed) gives an orientation (direct or indirect) to the
Geom_CylindricalSurfacecylinder. See Alsogce_MakeCylinderwhich provides functions for more complex cylinder constructionsGeom_CylindricalSurfacewhich provides additional functions for constructing cylinders and works, in particular, with the parametric equations of cylindersgp_Ax3
Constructors(2)
Creates a indefinite cylinder.
- constructor(theA3: gp_Ax3, theRadius: number): gp_Cylinder
Creates a cylinder of radius Radius, whose axis is the "main Axis" of theA3. theA3 is the local coordinate system of the cylinder. Raises ConstructionErrord if theRadius < 0.0.
Parameters (2)theA3theRadius
Instance methods(30)
Changes the symmetry axis of the cylinder. Raises ConstructionError if the direction of theA1 is parallel to the "XDirection" of the coordinate system of the cylinder.
Parameters (1)theA1
- SetLocation(theLoc: gp_Pnt): void
Changes the location of the surface.
Parameters (1)theLoc
- SetPosition(theA3: gp_Ax3): void
Change the local coordinate system of the surface.
Parameters (1)theA3
- SetRadius(theR: number): void
Modifies the radius of this cylinder. Exceptions Standard_ConstructionError if theR is negative.
Parameters (1)theR
- UReverse(): void
Reverses the U parametrization of the cylinder reversing the YAxis.
- VReverse(): void
Reverses the V parametrization of the plane reversing the Axis.
- Direct(): boolean
Returns true if the local coordinate system of this cylinder is right-handed.
Returns the symmetry axis of the cylinder.
- Coefficients(theA1: number, theA2: number, theA3: number, theB1: number, theB2: number, theB3: number, theC1: number, theC2: number, theC3: number, theD: number): { theA1: number; theA2: number; theA3: number; theB1: number; theB2: number; theB3: number; theC1: number; theC2: number; theC3: number; theD: number }
Computes the coefficients of the implicit equation of the quadric in the absolute cartesian coordinate system : theA1.X2 + theA2.Y2 + theA3.Z**2 + 2.(theB1.X.Y + theB2.X.Z + theB3.Y.Z) + 2.(theC1.X + theC2.Y + theC3.Z) + theD = 0.0.
Parameters (10)theA1theA2theA3theB1theB2theB3theC1theC2theC3theD
ReturnsA result object with fields:
theA1: updated value from the call.theA2: updated value from the call.theA3: updated value from the call.theB1: updated value from the call.theB2: updated value from the call.theB3: updated value from the call.theC1: updated value from the call.theC2: updated value from the call.theC3: updated value from the call.theD: updated value from the call.
Returns the "Location" point of the cylinder.
Returns the local coordinate system of the cylinder.
- Radius(): number
Returns the radius of the cylinder.
Returns the axis X of the cylinder.
Returns the axis Y of the cylinder.
- Parameters (1)
theP
- Parameters (1)
theA1
- Parameters (1)
theA2
- Mirrored(theP: gp_Pnt): gp_Cylinder
Performs the symmetrical transformation of a cylinder with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
- Mirrored(theA1: gp_Ax1): gp_Cylinder
Performs the symmetrical transformation of a cylinder with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
- Mirrored(theA2: gp_Ax2): gp_Cylinder
Performs the symmetrical transformation of a cylinder with respect to a plane. The axis placement theA2 locates the plane of the of the symmetry : (Location, XDirection, YDirection).
Parameters (1)theA2
- Parameters (2)
theA1theAng
- Rotated(theA1: gp_Ax1, theAng: number): gp_Cylinder
Rotates a cylinder. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (2)
thePtheS
- Scaled(theP: gp_Pnt, theS: number): gp_Cylinder
Scales a cylinder. theS is the scaling value. The absolute value of theS is used to scale the cylinder.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Cylinder
Transforms a cylinder with the transformation theT from class Trsf.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec): gp_Cylinder
Translates a cylinder in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Cylinder
Translates a cylinder from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Dir
Describes a unit vector in 3D space. This unit vector is also called "Direction". See Also gce_MakeDir which provides functions for more complex unit vector constructions Geom_Direction which provides additional functions for constructing unit vectors and works, in particular, with the parametric equations of unit vectors.
Constructors(6)
Creates a direction corresponding to X axis.
- constructor(theDir: gp_Dir_D): gp_Dir
Creates a direction from a standard direction enumeration.
Parameters (1)theDir
- constructor(theV: gp_Vec): gp_Dir
Normalizes the vector theV and creates a direction. Raises ConstructionError if theV.Magnitude() <= Resolution.
Parameters (1)theV
RemarksNote: Constexpr-compatible when input is already normalized.
- constructor(theCoord: gp_XYZ): gp_Dir
Creates a direction from a triplet of coordinates. Raises ConstructionError if theCoord.Modulus() <= Resolution from gp.
Parameters (1)theCoord
RemarksNote: Constexpr-compatible when input is already normalized.
- constructor(a0: gp_Dir): gp_DirParameters (1)
a0
- constructor(theXv: number, theYv: number, theZv: number): gp_Dir
Creates a direction with its 3 cartesian coordinates. Raises ConstructionError if std::sqrt(theXvtheXv + theYvtheYv + theZvtheZv) <= Resolution Modification of the direction's coordinates If std::sqrt (theXvtheXv + theYvtheYv + theZvtheZv) <= Resolution from gp where theXv, theYv ,theZv are the new coordinates it is not possible to construct the direction and the method raises the exception ConstructionError.
Parameters (3)theXvtheYvtheZv
RemarksNote: Constexpr-compatible when input is already normalized.
Instance methods(36)
- SetCoord(theIndex: number, theXi: number): void
For this unit vector, assigns the value Xi to:
- the X coordinate if theIndex is 1, or
- the Y coordinate if theIndex is 2, or
- the Z coordinate if theIndex is 3, and then normalizes it. Warning: Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_OutOfRange if theIndex is not 1, 2, or 3. Standard_ConstructionError if either of the following is less than or equal to
gp::Resolution(): - std::sqrt(XvXv + YvYv + Zv*Zv), or
- the modulus of the number triple formed by the new value theXi and the two other coordinates of this vector that were not directly modified.
Parameters (2)theIndextheXi
RemarksNote: Constexpr-compatible when result is already normalized.
- SetCoord(theXv: number, theYv: number, theZv: number): void
For this unit vector, assigns the values theXv, theYv and theZv to its three coordinates. Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly.
Parameters (3)theXvtheYvtheZv
RemarksNote: Constexpr-compatible when input is already normalized.
- SetX(theX: number): void
Assigns the given value to the X coordinate of this unit vector.
Parameters (1)theX
RemarksNote: Constexpr-compatible when result is already normalized.
- SetY(theY: number): void
Assigns the given value to the Y coordinate of this unit vector.
Parameters (1)theY
RemarksNote: Constexpr-compatible when result is already normalized.
- SetZ(theZ: number): void
Assigns the given value to the Z coordinate of this unit vector.
Parameters (1)theZ
RemarksNote: Constexpr-compatible when result is already normalized.
Assigns the three coordinates of theCoord to this unit vector.
Parameters (1)theCoord
RemarksNote: Constexpr-compatible when input is already normalized.
- Coord(theIndex: number): number
Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned Exceptions Standard_OutOfRange if theIndex is not 1, 2, or 3.
Parameters (1)theIndex
- Coord(theXv: number, theYv: number, theZv: number): { theXv: number; theYv: number; theZv: number }
Returns for the unit vector its three coordinates theXv, theYv, and theZv.
Parameters (3)theXvtheYvtheZv
ReturnsA result object with fields:
theXv: updated value from the call.theYv: updated value from the call.theZv: updated value from the call.
- X(): number
Returns the X coordinate for a unit vector.
- Y(): number
Returns the Y coordinate for a unit vector.
- Z(): number
Returns the Z coordinate for a unit vector.
for this unit vector, returns its three coordinates as a number triple.
Returns True if the angle between the two directions is lower or equal to theAngularTolerance.
Parameters (2)theOthertheAngularTolerance
Returns True if the angle between this unit vector and the unit vector theOther is equal to Pi/2 (normal).
Parameters (2)theOthertheAngularTolerance
- IsOpposite(theOther: gp_Dir, theAngularTolerance: number): boolean
Returns True if the angle between this unit vector and the unit vector theOther is equal to Pi (opposite).
Parameters (2)theOthertheAngularTolerance
- IsParallel(theOther: gp_Dir, theAngularTolerance: number): boolean
Returns true if the angle between this unit vector and the unit vector theOther is equal to 0 or to Pi. Note: the tolerance criterion is given by theAngularTolerance.
Parameters (2)theOthertheAngularTolerance
Computes the angular value in radians between <me> and <theOther>. This value is always positive in 3
Dspace. Returns the angle in the range [0, PI].Parameters (1)theOther
- AngleWithRef(theOther: gp_Dir, theVRef: gp_Dir): number
Computes the angular value between <me> and <theOther>. <theVRef> is the direction of reference normal to <me> and <theOther> and its orientation gives the positive sense of rotation. If the cross product <me> ^ <theOther> has the same orientation as <theVRef> the angular value is positive else negative. Returns the angular value in the range -PI and PI (in radians). Raises DomainError if <me> and <theOther> are not parallel this exception is raised when <theVRef> is in the same plane as <me> and <theOther> The tolerance criterion is Resolution from package gp.
Parameters (2)theOthertheVRef
Computes the cross product between two directions Raises the exception ConstructionError if the two directions are parallel because the computed vector cannot be normalized to create a direction.
Parameters (1)theRight
RemarksNote: Constexpr-compatible when result is already normalized.
Computes the triple vector product. <me> ^ (V1 ^ V2) Raises the exception ConstructionError if V1 and V2 are parallel or <me> and (V1^V2) are parallel because the computed vector can't be normalized to create a direction.
Parameters (1)theRight
RemarksNote: Constexpr-compatible when result is already normalized.
- CrossCross(theV1: gp_Dir, theV2: gp_Dir): voidParameters (2)
theV1theV2
RemarksNote: Constexpr-compatible when result is already normalized.
- CrossCrossed(theV1: gp_Dir, theV2: gp_Dir): gp_Dir
Computes the double vector product this ^ (theV1 ^ theV2).
- CrossCrossed creates a new unit vector. Exceptions Standard_ConstructionError if:
- theV1 and theV2 are parallel, or
- this unit vector and (theV1 ^ theV2) are parallel. This is because, in these conditions, the computed vector is null and cannot be normalized.
Parameters (2)theV1theV2
RemarksNote: Constexpr-compatible when result is already normalized.
Computes the scalar product.
Parameters (1)theOther
Computes the triple scalar product <me> * (theV1 ^ theV2). Warnings : The computed vector theV1' = theV1 ^ theV2 is not normalized to create a unitary vector. So this method never raises an exception even if theV1 and theV2 are parallel.
Parameters (2)theV1theV2
- Reverse(): void
Reverses the orientation of a direction geometric transformations Performs the symmetrical transformation of a direction with respect to the direction V which is the center of the symmetry.
- Parameters (1)
theV
- Parameters (1)
theA1
- Parameters (1)
theA2
Performs the symmetrical transformation of a direction with respect to the direction theV which is the center of the symmetry.
Parameters (1)theV
Performs the symmetrical transformation of a direction with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
Performs the symmetrical transformation of a direction with respect to a plane. The axis placement theA2 locates the plane of the symmetry : (Location, XDirection, YDirection).
Parameters (1)theA2
- Parameters (2)
theA1theAng
Rotates a direction. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Dir
Transforms a direction with a "Trsf" from gp. Warnings : If the scale factor of the "Trsf" theT is negative then the direction <me> is reversed.
Parameters (1)theT
Properties(5)
Direction along positive Y axis (0, 1, 0).
Direction along positive Z axis (0, 0, 1).
Direction along negative X axis (-1, 0, 0).
Direction along negative Y axis (0, -1, 0).
Direction along negative Z axis (0, 0, -1).
gp_Dir2d
Describes a unit vector in the plane (2D space). This unit vector is also called "Direction". See Also gce_MakeDir2d which provides functions for more complex unit vector constructions Geom2d_Direction which provides additional functions for constructing unit vectors and works, in particular, with the parametric equations of unit vectors.
Constructors(5)
Creates a direction corresponding to X axis.
- constructor(theDir: gp_Dir2d_D): gp_Dir2d
Creates a direction from a standard direction enumeration.
Parameters (1)theDir
- constructor(theV: gp_Vec2d): gp_Dir2d
Normalizes the vector theV and creates a Direction. Raises ConstructionError if theV.Magnitude() <= Resolution from gp.
Parameters (1)theV
RemarksNote: Constexpr-compatible when input is already normalized.
- constructor(theCoord: gp_XY): gp_Dir2d
Creates a Direction from a doublet of coordinates. Raises ConstructionError if theCoord.Modulus() <= Resolution from gp.
Parameters (1)theCoord
RemarksNote: Constexpr-compatible when input is already normalized.
- constructor(theXv: number, theYv: number): gp_Dir2d
Creates a Direction with its 2 cartesian coordinates. Raises ConstructionError if std::sqrt(theXvtheXv + theYvtheYv) <= Resolution from gp.
Parameters (2)theXvtheYv
RemarksNote: Constexpr-compatible when input is already normalized.
Instance methods(27)
- SetCoord(theIndex: number, theXi: number): void
For this unit vector, assigns: the value theXi to:
- the X coordinate if theIndex is 1, or
- the Y coordinate if theIndex is 2, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_OutOfRange if theIndex is not 1 or 2. Standard_ConstructionError if either of the following is less than or equal to
gp::Resolution(): - std::sqrt(theXvtheXv + theYvtheYv), or
- the modulus of the number pair formed by the new value theXi and the other coordinate of this vector that was not directly modified. Raises OutOfRange if theIndex != {1, 2}.
Parameters (2)theIndextheXi
RemarksNote: Constexpr-compatible when result is already normalized.
- SetCoord(theXv: number, theYv: number): void
For this unit vector, assigns:
- the values theXv and theYv to its two coordinates, Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_OutOfRange if theIndex is not 1 or 2. Standard_ConstructionError if either of the following is less than or equal to
gp::Resolution(): - std::sqrt(theXvtheXv + theYvtheYv), or
- the modulus of the number pair formed by the new value Xi and the other coordinate of this vector that was not directly modified. Raises OutOfRange if theIndex != {1, 2}.
Parameters (2)theXvtheYv
RemarksNote: Constexpr-compatible when input is already normalized.
- the values theXv and theYv to its two coordinates, Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_OutOfRange if theIndex is not 1 or 2. Standard_ConstructionError if either of the following is less than or equal to
- SetX(theX: number): void
Assigns the given value to the X coordinate of this unit vector, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_ConstructionError if either of the following is less than or equal to
gp::Resolution():- the modulus of Coord, or
- the modulus of the number pair formed from the new X or Y coordinate and the other coordinate of this vector that was not directly modified.
Parameters (1)theX
RemarksNote: Constexpr-compatible when result is already normalized.
- SetY(theY: number): void
Assigns the given value to the Y coordinate of this unit vector, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_ConstructionError if either of the following is less than or equal to
gp::Resolution():- the modulus of Coord, or
- the modulus of the number pair formed from the new X or Y coordinate and the other coordinate of this vector that was not directly modified.
Parameters (1)theY
RemarksNote: Constexpr-compatible when result is already normalized.
Assigns:
- the two coordinates of theCoord to this unit vector, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_ConstructionError if either of the following is less than or equal to
gp::Resolution(): - the modulus of theCoord, or
- the modulus of the number pair formed from the new X or Y coordinate and the other coordinate of this vector that was not directly modified.
Parameters (1)theCoord
RemarksNote: Constexpr-compatible when input is already normalized.
- the two coordinates of theCoord to this unit vector, and then normalizes it. Warning Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly. Exceptions Standard_ConstructionError if either of the following is less than or equal to
- Coord(theIndex: number): number
For this unit vector returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}.
Parameters (1)theIndex
- Coord(theXv: number, theYv: number): { theXv: number; theYv: number }
For this unit vector returns its two coordinates theXv and theYv. Raises OutOfRange if theIndex != {1, 2}.
Parameters (2)theXvtheYv
ReturnsA result object with fields:
theXv: updated value from the call.theYv: updated value from the call.
- X(): number
For this unit vector, returns its X coordinate.
- Y(): number
For this unit vector, returns its Y coordinate.
For this unit vector, returns its two coordinates as a number pair. Comparison between Directions The precision value is an input data.
Returns True if the two vectors have the same direction i.e. the angle between this unit vector and the unit vector theOther is less than or equal to theAngularTolerance.
Parameters (2)theOthertheAngularTolerance
Returns True if the angle between this unit vector and the unit vector theOther is equal to Pi/2 or -Pi/2 (normal) i.e. std::abs(std::abs(<me>.Angle(theOther)) - PI/2.) <= theAngularTolerance.
Parameters (2)theOthertheAngularTolerance
- IsOpposite(theOther: gp_Dir2d, theAngularTolerance: number): boolean
Returns True if the angle between this unit vector and the unit vector theOther is equal to Pi or -Pi (opposite). i.e. PI - std::abs(<me>.Angle(theOther)) <= theAngularTolerance.
Parameters (2)theOthertheAngularTolerance
- IsParallel(theOther: gp_Dir2d, theAngularTolerance: number): boolean
Returns True if the angle between this unit vector and unit vector theOther is equal to 0, Pi or -Pi. i.e. std::abs(Angle(<me>, theOther)) <= theAngularTolerance or PI - std::abs(Angle(<me>, theOther)) <= theAngularTolerance.
Parameters (2)theOthertheAngularTolerance
Computes the angular value in radians between <me> and <theOther>. Returns the angle in the range [-PI, PI].
Parameters (1)theOther
Computes the cross product between two directions.
Parameters (1)theRight
Computes the scalar product.
Parameters (1)theOther
- Reverse(): void
Reverses the orientation of a direction.
- Parameters (1)
theV
- Parameters (1)
theA
Performs the symmetrical transformation of a direction with respect to the direction theV which is the center of the symmetry.
Parameters (1)theV
Performs the symmetrical transformation of a direction with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA
- Rotate(Ang: number): voidParameters (1)
Ang
Rotates a direction. theAng is the angular value of the rotation in radians.
Parameters (1)theAng
- Parameters (1)
theT
- Transformed(theT: gp_Trsf2d): gp_Dir2d
Transforms a direction with the "Trsf" theT. Warnings : If the scale factor of the "Trsf" theT is negative then the direction <me> is reversed.
Parameters (1)theT
gp_Elips
Describes an ellipse in 3D space. An ellipse is defined by its major and minor radii and positioned in space with a coordinate system (a gp_Ax2 object) as follows:
- the origin of the coordinate system is the center of the ellipse,
- its "X Direction" defines the major axis of the ellipse, and
- its "Y Direction" defines the minor axis of the ellipse. Together, the origin, "X Direction" and "Y Direction" of this coordinate system define the plane of the ellipse. This coordinate system is the "local coordinate system" of the ellipse.
In this coordinate system, the equation of the ellipse is: XX/(MajorRadius**2)+YY/(MinorRadius**2)=1.0 The "main Direction" of the local coordinate system gives the normal vector to the plane of the ellipse. This vector gives an implicit orientation to the ellipse (definition of the trigonometric sense). We refer to the "main Axis" of the local coordinate system as the "Axis" of the ellipse.
See Alsogce_MakeElipswhich provides functions for more complex ellipse constructionsGeom_Ellipsewhich provides additional functions for constructing ellipses and works, in particular, with the parametric equations of ellipses
Constructors(2)
Creates an indefinite ellipse.
- constructor(theA2: gp_Ax2, theMajorRadius: number, theMinorRadius: number): gp_Elips
The major radius of the ellipse is on the "XAxis" and the minor radius is on the "YAxis" of the ellipse. The "XAxis" is defined with the "XDirection" of theA2 and the "YAxis" is defined with the "YDirection" of theA2. Warnings : It is not forbidden to create an ellipse with theMajorRadius = theMinorRadius. Raises ConstructionError if theMajorRadius < theMinorRadius or theMinorRadius < 0.
Parameters (3)theA2theMajorRadiustheMinorRadius
Instance methods(36)
Changes the axis normal to the plane of the ellipse. It modifies the definition of this plane. The "XAxis" and the "YAxis" are recomputed. The local coordinate system is redefined so that:
- its origin and "main Direction" become those of the axis theA1 (the "X Direction" and "Y Direction" are then recomputed in the same way as for any
gp_Ax2), or Raises ConstructionError if the direction of theA1 is parallel to the direction of the "XAxis" of the ellipse.
Parameters (1)theA1
- its origin and "main Direction" become those of the axis theA1 (the "X Direction" and "Y Direction" are then recomputed in the same way as for any
- SetLocation(theP: gp_Pnt): void
Modifies this ellipse, by redefining its local coordinate so that its origin becomes theP.
Parameters (1)theP
- SetMajorRadius(theMajorRadius: number): void
The major radius of the ellipse is on the "XAxis" (major axis) of the ellipse. Raises ConstructionError if theMajorRadius < MinorRadius.
Parameters (1)theMajorRadius
- SetMinorRadius(theMinorRadius: number): void
The minor radius of the ellipse is on the "YAxis" (minor axis) of the ellipse. Raises ConstructionError if theMinorRadius > MajorRadius or MinorRadius < 0.
Parameters (1)theMinorRadius
- SetPosition(theA2: gp_Ax2): void
Modifies this ellipse, by redefining its local coordinate so that it becomes theA2.
Parameters (1)theA2
- Area(): number
Computes the area of the Ellipse.
Computes the axis normal to the plane of the ellipse.
- Directrix1(): gp_Ax1
Computes the first or second directrix of this ellipse.
These are the lines, in the plane of the ellipse, normal to the major axis, at a distance equal to MajorRadius/e from the center of the ellipse, where e is the eccentricity of the ellipse. The first directrix (Directrix1) is on the positive side of the major axis. The second directrix (Directrix2) is on the negative side.
The directrix is returned as an axis (gp_Ax1object), the origin of which is situated on the "X Axis" of the local coordinate system of this ellipse. Exceptions Standard_ConstructionError if the eccentricity is null (the ellipse has degenerated into a circle). - Directrix2(): gp_Ax1
This line is obtained by the symmetrical transformation of "Directrix1" with respect to the "YAxis" of the ellipse. Exceptions Standard_ConstructionError if the eccentricity is null (the ellipse has degenerated into a circle).
- Eccentricity(): number
Returns the eccentricity of the ellipse between 0.0 and 1.0 If f is the distance between the center of the ellipse and the Focus1 then the eccentricity e = f / MajorRadius. Raises ConstructionError if MajorRadius = 0.0.
- Focal(): number
Computes the focal distance. It is the distance between the two focus focus1 and focus2 of the ellipse.
Returns the first focus of the ellipse. This focus is on the positive side of the "XAxis" of the ellipse.
Returns the second focus of the ellipse. This focus is on the negative side of the "XAxis" of the ellipse.
Returns the center of the ellipse. It is the "Location" point of the coordinate system of the ellipse.
- MajorRadius(): number
Returns the major radius of the ellipse.
- MinorRadius(): number
Returns the minor radius of the ellipse.
- Parameter(): number
Returns p = (1 - e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0.
Returns the coordinate system of the ellipse.
Returns the "XAxis" of the ellipse whose origin is the center of this ellipse. It is the major axis of the ellipse.
Returns the "YAxis" of the ellipse whose unit vector is the "X Direction" or the "Y Direction" of the local coordinate system of this ellipse. This is the minor axis of the ellipse.
- Parameters (1)
theP
- Parameters (1)
theA1
- Parameters (1)
theA2
Performs the symmetrical transformation of an ellipse with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
Performs the symmetrical transformation of an ellipse with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
Performs the symmetrical transformation of an ellipse with respect to a plane. The axis placement theA2 locates the plane of the symmetry (Location, XDirection, YDirection).
Parameters (1)theA2
- Parameters (2)
theA1theAng
Rotates an ellipse. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (2)
thePtheS
Scales an ellipse. theS is the scaling value.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Elips
Transforms an ellipse with the transformation theT from class Trsf.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec): gp_Elips
Translates an ellipse in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Elips
Translates an ellipse from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Elips2d
Describes an ellipse in the plane (2D space). An ellipse is defined by its major and minor radii and positioned in the plane with a coordinate system (a gp_Ax22d object) as follows:
- the origin of the coordinate system is the center of the ellipse,
- its "X Direction" defines the major axis of the ellipse, and
- its "Y Direction" defines the minor axis of the ellipse. This coordinate system is the "local coordinate system" of the ellipse. Its orientation (direct or indirect) gives an implicit orientation to the ellipse.
In this coordinate system, the equation of the ellipse is: XX/(MajorRadius**2)+YY/(MinorRadius**2)=1.0 See Alsogce_MakeElips2dwhich provides functions for more complex ellipse constructionsGeom2d_Ellipsewhich provides additional functions for constructing ellipses and works, in particular, with the parametric equations of ellipses
Constructors(3)
Creates an indefinite ellipse.
- constructor(theA: gp_Ax22d, theMajorRadius: number, theMinorRadius: number): gp_Elips2d
Creates an ellipse with radii MajorRadius and MinorRadius, positioned in the plane by coordinate system theA where:
- the origin of theA is the center of the ellipse,
- the "X Direction" of theA defines the major axis of the ellipse, that is, the major radius MajorRadius is measured along this axis, and
- the "Y Direction" of theA defines the minor axis of the ellipse, that is, the minor radius theMinorRadius is measured along this axis, and
- the orientation (direct or indirect sense) of theA gives the orientation of the ellipse. Warnings : It is possible to create an ellipse with theMajorRadius = theMinorRadius. Raises ConstructionError if theMajorRadius < theMinorRadius or theMinorRadius < 0.0
Parameters (3)theAtheMajorRadiustheMinorRadius
- constructor(theMajorAxis: gp_Ax2d, theMajorRadius: number, theMinorRadius: number, theIsSense?: boolean): gp_Elips2d
Creates an ellipse with the major axis, the major and the minor radius. The location of the theMajorAxis is the center of the ellipse. The sense of parametrization is given by theIsSense. Warnings: It is possible to create an ellipse with theMajorRadius = theMinorRadius. Raises ConstructionError if theMajorRadius < theMinorRadius or theMinorRadius < 0.0.
Parameters (4)theMajorAxistheMajorRadiustheMinorRadiustheIsSense
Instance methods(38)
- SetLocation(theP: gp_Pnt2d): void
Modifies this ellipse, by redefining its local coordinate system so that.
- its origin becomes theP.
Parameters (1)theP
- SetMajorRadius(theMajorRadius: number): void
Changes the value of the major radius. Raises ConstructionError if theMajorRadius < MinorRadius.
Parameters (1)theMajorRadius
- SetMinorRadius(theMinorRadius: number): void
Changes the value of the minor radius. Raises ConstructionError if MajorRadius < theMinorRadius or MinorRadius < 0.0.
Parameters (1)theMinorRadius
Modifies this ellipse, by redefining its local coordinate system so that it becomes theA.
Parameters (1)theA
Modifies this ellipse, by redefining its local coordinate system so that its origin and its "X Direction" become those of the axis theA. The "Y Direction" is then recomputed. The orientation of the local coordinate system is not modified.
Parameters (1)theA
Modifies this ellipse, by redefining its local coordinate system so that its origin and its "Y Direction" become those of the axis theA. The "X Direction" is then recomputed. The orientation of the local coordinate system is not modified.
Parameters (1)theA
- Area(): number
Computes the area of the ellipse.
- Coefficients(theA: number, theB: number, theC: number, theD: number, theE: number, theF: number): { theA: number; theB: number; theC: number; theD: number; theE: number; theF: number }
Returns the coefficients of the implicit equation of the ellipse. theA * (X2) + theB * (Y2) + 2theC(XY) + 2theDX + 2theE*Y + theF = 0.
Parameters (6)theAtheBtheCtheDtheEtheF
ReturnsA result object with fields:
theA: updated value from the call.theB: updated value from the call.theC: updated value from the call.theD: updated value from the call.theE: updated value from the call.theF: updated value from the call.
This directrix is the line normal to the XAxis of the ellipse in the local plane (Z = 0) at a distance d = MajorRadius / e from the center of the ellipse, where e is the eccentricity of the ellipse. This line is parallel to the "YAxis". The intersection point between directrix1 and the "XAxis" is the location point of the directrix1. This point is on the positive side of the "XAxis".
Raised if Eccentricity = 0.0. (The ellipse degenerates into a circle)This line is obtained by the symmetrical transformation of "Directrix1" with respect to the minor axis of the ellipse.
Raised if Eccentricity = 0.0. (The ellipse degenerates into a circle).- Eccentricity(): number
Returns the eccentricity of the ellipse between 0.0 and 1.0 If f is the distance between the center of the ellipse and the Focus1 then the eccentricity e = f / MajorRadius. Returns 0 if MajorRadius = 0.
- Focal(): number
Returns the distance between the center of the ellipse and focus1 or focus2.
Returns the first focus of the ellipse. This focus is on the positive side of the major axis of the ellipse.
Returns the second focus of the ellipse. This focus is on the negative side of the major axis of the ellipse.
Returns the center of the ellipse.
- MajorRadius(): number
Returns the major radius of the Ellipse.
- MinorRadius(): number
Returns the minor radius of the Ellipse.
- Parameter(): number
Returns p = (1 - e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0.
Returns the major axis of the ellipse.
Returns the major axis of the ellipse.
Returns the minor axis of the ellipse. Reverses the direction of the circle.
- Reverse(): void
- IsDirect(): boolean
Returns true if the local coordinate system is direct and false in the other case.
- Parameters (1)
theP
- Parameters (1)
theA
- Mirrored(theP: gp_Pnt2d): gp_Elips2d
Performs the symmetrical transformation of a ellipse with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
- Mirrored(theA: gp_Ax2d): gp_Elips2d
Performs the symmetrical transformation of a ellipse with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA
- Parameters (2)
thePtheAng
- Rotated(theP: gp_Pnt2d, theAng: number): gp_Elips2dParameters (2)
thePtheAng
- Parameters (2)
thePtheS
- Scaled(theP: gp_Pnt2d, theS: number): gp_Elips2d
Scales a ellipse. theS is the scaling value.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf2d): gp_Elips2d
Transforms an ellipse with the transformation theT from class Trsf2d.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec2d): gp_Elips2d
Translates a ellipse in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Elips2d
Translates a ellipse from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_EulerSequence
Properties(26)
gp_GTrsf
Defines a non-persistent transformation in 3D space. This transformation is a general transformation. It can be a gp_Trsf, an affinity, or you can define your own transformation giving the matrix of transformation.
With a gp_GTrsf you can transform only a triplet of coordinates gp_XYZ. It is not possible to transform other geometric objects because these transformations can change the nature of non-elementary geometric objects. The transformation gp_GTrsf can be represented as follow:
where {V1, V2, V3} define the vectorial part of the transformation and T defines the translation part of the transformation. Warning A gp_GTrsf transformation is only applicable to coordinates.
Be careful if you apply such a transformation to all points of a geometric object, as this can change the nature of the object and thus render it incoherent! Typically, a circle is transformed into an ellipse by an affinity transformation.
To avoid modifying the nature of an object, use a gp_Trsf transformation instead, as objects of this class respect the nature of geometric objects.
Constructors(3)
Returns the Identity transformation.
- constructor(theT: gp_Trsf): gp_GTrsf
Converts the
gp_Trsftransformation theT into a general transformation, i.e. Returns a GTrsf with the same matrix of coefficients as the Trsf theT.Parameters (1)theT
- constructor(theM: gp_Mat, theV: gp_XYZ): gp_GTrsf
Creates a transformation based on the matrix theM and the vector theV where theM defines the vectorial part of the transformation, and V the translation part, or.
Parameters (2)theMtheV
Instance methods(23)
- SetAffinity(theA1: gp_Ax1, theRatio: number): void
Changes this transformation into an affinity of ratio theRatio with respect to the axis theA1. Note: an affinity is a point-by-point transformation that transforms any point P into a point P' such that if H is the orthogonal projection of P on the axis theA1 or the plane A2, the vectors HP and HP' satisfy: HP' = theRatio * HP.
Parameters (2)theA1theRatio
- SetAffinity(theA2: gp_Ax2, theRatio: number): void
Changes this transformation into an affinity of ratio theRatio with respect to the plane defined by the origin, the "X Direction" and the "Y Direction" of coordinate system theA2. Note: an affinity is a point-by-point transformation that transforms any point P into a point P' such that if H is the orthogonal projection of P on the axis A1 or the plane theA2, the vectors HP and HP' satisfy: HP' = theRatio * HP.
Parameters (2)theA2theRatio
- SetValue(theRow: number, theCol: number, theValue: number): void
Replaces the coefficient (theRow, theCol) of the matrix representing this transformation by theValue. Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 4.
Parameters (3)theRowtheColtheValue
- SetVectorialPart(theMatrix: gp_Mat): void
Replaces the vectorial part of this transformation by theMatrix.
Parameters (1)theMatrix
- SetTranslationPart(theCoord: gp_XYZ): void
Replaces the translation part of this transformation by the coordinates of the number triple theCoord.
Parameters (1)theCoord
Assigns the vectorial and translation parts of theT to this transformation.
Parameters (1)theT
- IsNegative(): boolean
Returns true if the determinant of the vectorial part of this transformation is negative.
- IsSingular(): boolean
Returns true if this transformation is singular (and therefore, cannot be inverted). Note: The Gauss LU decomposition is used to invert the transformation matrix. Consequently, the transformation is considered as singular if the largest pivot found is less than or equal to
gp::Resolution(). Warning If this transformation is singular, it cannot be inverted. - Form(): gp_TrsfForm
Returns the nature of the transformation. It can be an identity transformation, a rotation, a translation, a mirror transformation (relative to a point, an axis or a plane), a scaling transformation, a compound transformation or some other type of transformation.
- SetForm(): void
verify and set the shape of the GTrsf Other or CompoundTrsf Ex :
Returns the translation part of the GTrsf.
Computes the vectorial part of the GTrsf. The returned Matrix is a 3*3 matrix.
- Value(theRow: number, theCol: number): number
Returns the coefficients of the global matrix of transformation. Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 4.
Parameters (2)theRowtheCol
- Invert(): void
Computes the reverse transformation. Raises an exception if the matrix of the transformation is not inversible.
- Multiplied(theT: gp_GTrsf): gp_GTrsf
Computes the transformation composed from theT and <me>. In a C++ implementation you can also write Tcomposed = <me> * theT. Example :
Parameters (1)theT
Computes the transformation composed with <me> and theT. <me> = <me> * theT.
Parameters (1)theT
- PreMultiply(theT: gp_GTrsf): void
Computes the product of the transformation theT and this transformation and assigns the result to this transformation. this = theT * this.
Parameters (1)theT
- Power(theN: number): voidParameters (1)
theN
Computes:
- the product of this transformation multiplied by itself theN times, if theN is positive, or
- the product of the inverse of this transformation multiplied by itself |theN| times, if theN is negative. If theN equals zero, the result is equal to the Identity transformation. I.e.: <me> * <me> * .......* <me>, theN time. if theN =0 <me> = Identity if theN < 0 <me> = <me>.Inverse() ........... <me>.Inverse().
Raises an exception if N < 0 and if the matrix of the transformation not inversible.
Parameters (1)theN
- Transforms(theCoord: gp_XYZ): voidParameters (1)
theCoord
- Transforms(theX: number, theY: number, theZ: number): { theX: number; theY: number; theZ: number }
Transforms a triplet XYZ with a GTrsf.
Parameters (3)theXtheYtheZ
ReturnsA result object with fields:
theX: updated value from the call.theY: updated value from the call.theZ: updated value from the call.
gp_GTrsf2d
Defines a non persistent transformation in 2D space. This transformation is a general transformation. It can be a gp_Trsf2d, an affinity, or you can define your own transformation giving the corresponding matrix of transformation.
With a gp_GTrsf2d you can transform only a doublet of coordinates gp_XY. It is not possible to transform other geometric objects because these transformations can change the nature of non-elementary geometric objects. A gp_GTrsf2d is represented with a 2 rows * 3 columns matrix:
where {V1, V2} defines the vectorial part of the transformation and T defines the translation part of the transformation. Warning A gp_GTrsf2d transformation is only applicable on coordinates.
Be careful if you apply such a transformation to all the points of a geometric object, as this can change the nature of the object and thus render it incoherent! Typically, a circle is transformed into an ellipse by an affinity transformation. To avoid modifying the nature of an object, use a gp_Trsf2d transformation instead, as objects of this class respect the nature of geometric objects.
Constructors(3)
returns identity transformation.
- constructor(theT: gp_Trsf2d): gp_GTrsf2d
Converts the
gp_Trsf2dtransformation theT into a general transformation.Parameters (1)theT
- constructor(theM: gp_Mat2d, theV: gp_XY): gp_GTrsf2d
Creates a transformation based on the matrix theM and the vector theV where theM defines the vectorial part of the transformation, and theV the translation part.
Parameters (2)theMtheV
Instance methods(22)
- SetAffinity(theA: gp_Ax2d, theRatio: number): void
Changes this transformation into an affinity of ratio theRatio with respect to the axis theA. Note: An affinity is a point-by-point transformation that transforms any point P into a point P' such that if H is the orthogonal projection of P on the axis theA, the vectors HP and HP' satisfy: HP' = theRatio * HP.
Parameters (2)theAtheRatio
- SetValue(theRow: number, theCol: number, theValue: number): void
Replaces the coefficient (theRow, theCol) of the matrix representing this transformation by theValue, Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 3.
Parameters (3)theRowtheColtheValue
- SetTranslationPart(theCoord: gp_XY): void
Replaces the translation part of this transformation by the coordinates of the number pair theCoord.
Parameters (1)theCoord
Assigns the vectorial and translation parts of theT to this transformation.
Parameters (1)theT
- SetVectorialPart(theMatrix: gp_Mat2d): void
Replaces the vectorial part of this transformation by theMatrix.
Parameters (1)theMatrix
- IsNegative(): boolean
Returns true if the determinant of the vectorial part of this transformation is negative.
- IsSingular(): boolean
Returns true if this transformation is singular (and therefore, cannot be inverted). Note: The Gauss LU decomposition is used to invert the transformation matrix. Consequently, the transformation is considered as singular if the largest pivot found is less than or equal to
gp::Resolution(). Warning If this transformation is singular, it cannot be inverted. - Form(): gp_TrsfForm
Returns the nature of the transformation. It can be an identity transformation, a rotation, a translation, a mirror transformation (relative to a point or axis), a scaling transformation, a compound transformation or some other type of transformation.
Returns the translation part of the GTrsf2d.
Computes the vectorial part of the GTrsf2d. The returned Matrix is a 2*2 matrix.
- Value(theRow: number, theCol: number): number
Returns the coefficients of the global matrix of transformation. Raised OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 3.
Parameters (2)theRowtheCol
- Invert(): void
Computes the reverse transformation. Raised an exception if the matrix of the transformation is not inversible.
- Multiplied(theT: gp_GTrsf2d): gp_GTrsf2d
Computes the transformation composed with theT and <me>. In a C++ implementation you can also write Tcomposed = <me> * theT. Example :
Parameters (1)theT
- Multiply(theT: gp_GTrsf2d): voidParameters (1)
theT
- PreMultiply(theT: gp_GTrsf2d): void
Computes the product of the transformation theT and this transformation, and assigns the result to this transformation: this = theT * this.
Parameters (1)theT
- Power(theN: number): voidParameters (1)
theN
- Powered(theN: number): gp_GTrsf2d
Computes the following composition of transformations <me> * <me> * .......* <me>, theN time. if theN = 0 <me> = Identity if theN < 0 <me> = <me>.Inverse() ........... <me>.Inverse().
Raises an exception if theN < 0 and if the matrix of the transformation is not inversible.Parameters (1)theN
- Transforms(theCoord: gp_XY): voidParameters (1)
theCoord
- Transforms(theX: number, theY: number): { theX: number; theY: number }
Applies this transformation to the coordinates:
- of the number pair Coord, or
- X and Y.
Note: - Transforms modifies theX, theY, or the coordinate pair Coord, while
- Transformed creates a new coordinate pair.
Parameters (2)theXtheY
ReturnsA result object with fields:
theX: updated value from the call.theY: updated value from the call.
- Transformed(theCoord: gp_XY): gp_XYParameters (1)
theCoord
Converts this transformation into a
gp_Trsf2dtransformation. Exceptions Standard_ConstructionError if this transformation cannot be converted, i.e. if its form is gp_Other.
gp_Hypr
Describes a branch of a hyperbola in 3D space. A hyperbola is defined by its major and minor radii and positioned in space with a coordinate system (a gp_Ax2 object) of which:
- the origin is the center of the hyperbola,
- the "X Direction" defines the major axis of the hyperbola, and
- the "Y Direction" defines the minor axis of the hyperbola. The origin, "X Direction" and "Y Direction" of this coordinate system together define the plane of the hyperbola. This coordinate system is the "local coordinate system" of the hyperbola.
In this coordinate system, the equation of the hyperbola is: XX/(MajorRadius**2)-YY/(MinorRadius**2) = 1.0 The branch of the hyperbola described is the one located on the positive side of the major axis. The "main Direction" of the local coordinate system is a normal vector to the plane of the hyperbola. This vector gives an implicit orientation to the hyperbola. We refer to the "main Axis" of the local coordinate system as the "Axis" of the hyperbola.
The following schema shows the plane of the hyperbola, and in it, the respective positions of the three branches of hyperbolas constructed with the functions OtherBranch, ConjugateBranch1, and ConjugateBranch2: ^YAxis| FirstConjugateBranch | Other|Main ---------------------C------------------------------>XAxis Branch|Branch | | SecondConjugateBranch |^YAxisWarning The major radius can be less than the minor radius.
See Alsogce_MakeHyprwhich provides functions for more complex hyperbola constructionsGeom_Hyperbolawhich provides additional functions for constructing hyperbolas and works, in particular, with the parametric equations of hyperbolas
Constructors(2)
Creates of an indefinite hyperbola.
- constructor(theA2: gp_Ax2, theMajorRadius: number, theMinorRadius: number): gp_Hypr
Creates a hyperbola with radius theMajorRadius and theMinorRadius, positioned in the space by the coordinate system theA2 such that:
- the origin of theA2 is the center of the hyperbola,
- the "X Direction" of theA2 defines the major axis of the hyperbola, that is, the major radius theMajorRadius is measured along this axis, and
- the "Y Direction" of theA2 defines the minor axis of the hyperbola, that is, the minor radius theMinorRadius is measured along this axis. Note: This class does not prevent the creation of a hyperbola where:
- theMajorAxis is equal to theMinorAxis, or
- theMajorAxis is less than theMinorAxis. Exceptions Standard_ConstructionError if theMajorAxis or theMinorAxis is negative. Raises ConstructionError if theMajorRadius < 0.0 or theMinorRadius < 0.0 Raised if theMajorRadius < 0.0 or theMinorRadius < 0.0
Parameters (3)theA2theMajorRadiustheMinorRadius
Instance methods(40)
Modifies this hyperbola, by redefining its local coordinate system so that:
- its origin and "main Direction" become those of the axis theA1 (the "X Direction" and "Y Direction" are then recomputed in the same way as for any
gp_Ax2). Raises ConstructionError if the direction of theA1 is parallel to the direction of the "XAxis" of the hyperbola.
Parameters (1)theA1
- its origin and "main Direction" become those of the axis theA1 (the "X Direction" and "Y Direction" are then recomputed in the same way as for any
- SetLocation(theP: gp_Pnt): void
Modifies this hyperbola, by redefining its local coordinate system so that its origin becomes theP.
Parameters (1)theP
- SetMajorRadius(theMajorRadius: number): void
Modifies the major radius of this hyperbola. Exceptions Standard_ConstructionError if theMajorRadius is negative.
Parameters (1)theMajorRadius
- SetMinorRadius(theMinorRadius: number): void
Modifies the minor radius of this hyperbola. Exceptions Standard_ConstructionError if theMinorRadius is negative.
Parameters (1)theMinorRadius
- SetPosition(theA2: gp_Ax2): void
Modifies this hyperbola, by redefining its local coordinate system so that it becomes A2.
Parameters (1)theA2
- Asymptote1(): gp_Ax1
In the local coordinate system of the hyperbola the equation of the hyperbola is (XX)/(AA) - (YY)/(BB) = 1.0 and the equation of the first asymptote is Y = (B/A)*X where A is the major radius and B is the minor radius. Raises ConstructionError if MajorRadius = 0.0.
- Asymptote2(): gp_Ax1
In the local coordinate system of the hyperbola the equation of the hyperbola is (XX)/(AA) - (YY)/(BB) = 1.0 and the equation of the first asymptote is Y = -(B/A)*X. where A is the major radius and B is the minor radius. Raises ConstructionError if MajorRadius = 0.0.
Returns the axis passing through the center, and normal to the plane of this hyperbola.
Computes the branch of hyperbola which is on the positive side of the "YAxis" of <me>.
Computes the branch of hyperbola which is on the negative side of the "YAxis" of <me>.
- Directrix1(): gp_Ax1
This directrix is the line normal to the XAxis of the hyperbola in the local plane (Z = 0) at a distance d = MajorRadius / e from the center of the hyperbola, where e is the eccentricity of the hyperbola. This line is parallel to the "YAxis". The intersection point between the directrix1 and the "XAxis" is the "Location" point of the directrix1. This point is on the positive side of the "XAxis".
- Directrix2(): gp_Ax1
This line is obtained by the symmetrical transformation of "Directrix1" with respect to the "YAxis" of the hyperbola.
- Eccentricity(): number
Returns the eccentricity of the hyperbola (e > 1). If f is the distance between the location of the hyperbola and the Focus1 then the eccentricity e = f / MajorRadius. Raises DomainError if MajorRadius = 0.0.
- Focal(): number
Computes the focal distance. It is the distance between the the two focus of the hyperbola.
Returns the first focus of the hyperbola. This focus is on the positive side of the "XAxis" of the hyperbola.
Returns the second focus of the hyperbola. This focus is on the negative side of the "XAxis" of the hyperbola.
Returns the location point of the hyperbola. It is the intersection point between the "XAxis" and the "YAxis".
- MajorRadius(): number
Returns the major radius of the hyperbola. It is the radius on the "XAxis" of the hyperbola.
- MinorRadius(): number
Returns the minor radius of the hyperbola. It is the radius on the "YAxis" of the hyperbola.
Returns the branch of hyperbola obtained by doing the symmetrical transformation of <me> with respect to the "YAxis" of <me>.
- Parameter(): number
Returns p = (e * e - 1) * MajorRadius where e is the eccentricity of the hyperbola. Raises DomainError if MajorRadius = 0.0.
Returns the coordinate system of the hyperbola.
Computes an axis, whose.
- the origin is the center of this hyperbola, and
- the unit vector is the "X Direction" of the local coordinate system of this hyperbola. These axes are, the major axis (the "X Axis") and of this hyperboReturns the "XAxis" of the hyperbola.
Computes an axis, whose.
- the origin is the center of this hyperbola, and
- the unit vector is the "Y Direction" of the local coordinate system of this hyperbola. These axes are the minor axis (the "Y Axis") of this hyperbola
- Parameters (1)
theP
- Parameters (1)
theA1
- Parameters (1)
theA2
Performs the symmetrical transformation of an hyperbola with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
Performs the symmetrical transformation of an hyperbola with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
Performs the symmetrical transformation of an hyperbola with respect to a plane. The axis placement theA2 locates the plane of the symmetry (Location, XDirection, YDirection).
Parameters (1)theA2
- Parameters (2)
theA1theAng
Rotates an hyperbola. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (2)
thePtheS
Scales an hyperbola. theS is the scaling value.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Hypr
Transforms an hyperbola with the transformation theT from class Trsf.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec): gp_Hypr
Translates an hyperbola in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Hypr
Translates an hyperbola from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Hypr2d
Describes a branch of a hyperbola in the plane (2D space). A hyperbola is defined by its major and minor radii, and positioned in the plane with a coordinate system (a gp_Ax22d object) of which:
- the origin is the center of the hyperbola,
- the "X Direction" defines the major axis of the hyperbola, and
- the "Y Direction" defines the minor axis of the hyperbola. This coordinate system is the "local coordinate system" of the hyperbola. The orientation of this coordinate system (direct or indirect) gives an implicit orientation to the hyperbola.
In this coordinate system, the equation of the hyperbola is: XX/(MajorRadius**2)-YY/(MinorRadius**2) = 1.0 The branch of the hyperbola described is the one located on the positive side of the major axis.
The following schema shows the plane of the hyperbola, and in it, the respective positions of the three branches of hyperbolas constructed with the functions OtherBranch, ConjugateBranch1, and ConjugateBranch2: ^YAxis| FirstConjugateBranch | Other|Main ---------------------C------------------------------>XAxis Branch|Branch | | SecondConjugateBranch | Warning The major radius can be less than the minor radius.
See Alsogce_MakeHypr2dwhich provides functions for more complex hyperbola constructionsGeom2d_Hyperbolawhich provides additional functions for constructing hyperbolas and works, in particular, with the parametric equations of hyperbolas
Constructors(3)
Creates of an indefinite hyperbola.
- constructor(theA: gp_Ax22d, theMajorRadius: number, theMinorRadius: number): gp_Hypr2d
a hyperbola with radii theMajorRadius and theMinorRadius, positioned in the plane by coordinate system theA where:
- the origin of theA is the center of the hyperbola,
- the "X Direction" of theA defines the major axis of the hyperbola, that is, the major radius theMajorRadius is measured along this axis, and
- the "Y Direction" of theA defines the minor axis of the hyperbola, that is, the minor radius theMinorRadius is measured along this axis, and
- the orientation (direct or indirect sense) of theA gives the implicit orientation of the hyperbola. Warnings: It is yet possible to create an Hyperbola with theMajorRadius <= theMinorRadius. Raises ConstructionError if theMajorRadius < 0.0 or theMinorRadius < 0.0
Parameters (3)theAtheMajorRadiustheMinorRadius
- constructor(theMajorAxis: gp_Ax2d, theMajorRadius: number, theMinorRadius: number, theIsSense?: boolean): gp_Hypr2d
Creates a hyperbola with radii theMajorRadius and theMinorRadius, centered on the origin of theMajorAxis and where the unit vector of theMajorAxis is the "X Direction" of the local coordinate system of the hyperbola. This coordinate system is direct if theIsSense is true (the default value), and indirect if theIsSense is false. Warnings: It is yet possible to create an Hyperbola with theMajorRadius <= theMinorRadius. Raises ConstructionError if theMajorRadius < 0.0 or theMinorRadius < 0.0.
Parameters (4)theMajorAxistheMajorRadiustheMinorRadiustheIsSense
Instance methods(42)
- SetLocation(theP: gp_Pnt2d): void
Modifies this hyperbola, by redefining its local coordinate system so that its origin becomes theP.
Parameters (1)theP
- SetMajorRadius(theMajorRadius: number): void
Modifies the major or minor radius of this hyperbola. Exceptions Standard_ConstructionError if theMajorRadius or MinorRadius is negative.
Parameters (1)theMajorRadius
- SetMinorRadius(theMinorRadius: number): void
Modifies the major or minor radius of this hyperbola. Exceptions Standard_ConstructionError if MajorRadius or theMinorRadius is negative.
Parameters (1)theMinorRadius
Modifies this hyperbola, by redefining its local coordinate system so that it becomes theA.
Parameters (1)theA
Changes the major axis of the hyperbola. The minor axis is recomputed and the location of the hyperbola too.
Parameters (1)theA
Changes the minor axis of the hyperbola.The minor axis is recomputed and the location of the hyperbola too.
Parameters (1)theA
In the local coordinate system of the hyperbola the equation of the hyperbola is (XX)/(AA) - (YY)/(BB) = 1.0 and the equation of the first asymptote is Y = (B/A)*X where A is the major radius of the hyperbola and B the minor radius of the hyperbola. Raises ConstructionError if MajorRadius = 0.0.
In the local coordinate system of the hyperbola the equation of the hyperbola is (XX)/(AA) - (YY)/(BB) = 1.0 and the equation of the first asymptote is Y = -(B/A)*X where A is the major radius of the hyperbola and B the minor radius of the hyperbola. Raises ConstructionError if MajorRadius = 0.0.
- Coefficients(theA: number, theB: number, theC: number, theD: number, theE: number, theF: number): { theA: number; theB: number; theC: number; theD: number; theE: number; theF: number }
Computes the coefficients of the implicit equation of the hyperbola : theA * (X2) + theB * (Y2) + 2theC(XY) + 2theDX + 2theE*Y + theF = 0.
Parameters (6)theAtheBtheCtheDtheEtheF
ReturnsA result object with fields:
theA: updated value from the call.theB: updated value from the call.theC: updated value from the call.theD: updated value from the call.theE: updated value from the call.theF: updated value from the call.
Computes the branch of hyperbola which is on the positive side of the "YAxis" of <me>.
Computes the branch of hyperbola which is on the negative side of the "YAxis" of <me>.
Computes the directrix which is the line normal to the XAxis of the hyperbola in the local plane (Z = 0) at a distance d = MajorRadius / e from the center of the hyperbola, where e is the eccentricity of the hyperbola. This line is parallel to the "YAxis". The intersection point between the "Directrix1" and the "XAxis" is the "Location" point of the "Directrix1". This point is on the positive side of the "XAxis".
This line is obtained by the symmetrical transformation of "Directrix1" with respect to the "YAxis" of the hyperbola.
- Eccentricity(): number
Returns the eccentricity of the hyperbola (e > 1). If f is the distance between the location of the hyperbola and the Focus1 then the eccentricity e = f / MajorRadius. Raises DomainError if MajorRadius = 0.0.
- Focal(): number
Computes the focal distance. It is the distance between the "Location" of the hyperbola and "Focus1" or "Focus2".
Returns the first focus of the hyperbola. This focus is on the positive side of the "XAxis" of the hyperbola.
Returns the second focus of the hyperbola. This focus is on the negative side of the "XAxis" of the hyperbola.
Returns the location point of the hyperbola. It is the intersection point between the "XAxis" and the "YAxis".
- MajorRadius(): number
Returns the major radius of the hyperbola (it is the radius corresponding to the "XAxis" of the hyperbola).
- MinorRadius(): number
Returns the minor radius of the hyperbola (it is the radius corresponding to the "YAxis" of the hyperbola).
Returns the branch of hyperbola obtained by doing the symmetrical transformation of <me> with respect to the "YAxis" of <me>.
- Parameter(): number
Returns p = (e * e - 1) * MajorRadius where e is the eccentricity of the hyperbola. Raises DomainError if MajorRadius = 0.0.
Returns the axisplacement of the hyperbola.
Computes an axis whose.
- the origin is the center of this hyperbola, and
- the unit vector is the "X Direction" or "Y Direction" respectively of the local coordinate system of this hyperbola Returns the major axis of the hyperbola.
Computes an axis whose.
- the origin is the center of this hyperbola, and
- the unit vector is the "X Direction" or "Y Direction" respectively of the local coordinate system of this hyperbola Returns the minor axis of the hyperbola.
- Reverse(): void
Reverses the orientation of the local coordinate system of this hyperbola (the "Y Axis" is reversed). Therefore, the implicit orientation of this hyperbola is reversed. Note:
- Reverse assigns the result to this hyperbola, while
- Reversed creates a new one.
- IsDirect(): boolean
Returns true if the local coordinate system is direct and false in the other case.
- Parameters (1)
theP
- Parameters (1)
theA
Performs the symmetrical transformation of an hyperbola with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
Performs the symmetrical transformation of an hyperbola with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA
- Parameters (2)
thePtheAng
Rotates an hyperbola. theP is the center of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)thePtheAng
- Parameters (2)
thePtheS
Scales an hyperbola. <theS> is the scaling value. If <theS> is positive only the location point is modified. But if <theS> is negative the "XAxis" is reversed and the "YAxis" too.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf2d): gp_Hypr2d
Transforms an hyperbola with the transformation theT from class Trsf2d.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec2d): gp_Hypr2d
Translates an hyperbola in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Hypr2d
Translates an hyperbola from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Lin
Describes a line in 3D space. A line is positioned in space with an axis (a gp_Ax1 object) which gives it an origin and a unit vector. A line and an axis are similar objects, thus, we can convert one into the other. A line provides direct access to the majority of the edit and query functions available on its positioning axis. In addition, however, a line has specific functions for computing distances and positions.
See Also gce_MakeLin which provides functions for more complex line constructions Geom_Line which provides additional functions for constructing lines and works, in particular, with the parametric equations of lines.
Constructors(3)
Creates a Line corresponding to Z axis of the reference coordinate system.
- constructor(theA1: gp_Ax1): gp_Lin
Creates a line defined by axis theA1.
Parameters (1)theA1
- constructor(theP: gp_Pnt, theV: gp_Dir): gp_Lin
Creates a line passing through point theP and parallel to vector theV (theP and theV are, respectively, the origin and the unit vector of the positioning axis of the line).
Parameters (2)thePtheV
Instance methods(31)
- Reverse(): void
Reverses the direction of the line. Note:
- Reverse assigns the result to this line, while
- Reversed creates a new one.
- SetDirection(theV: gp_Dir): void
Changes the direction of the line.
Parameters (1)theV
- SetLocation(theP: gp_Pnt): void
Changes the location point (origin) of the line.
Parameters (1)theP
- SetPosition(theA1: gp_Ax1): void
Complete redefinition of the line. The "Location" point of <theA1> is the origin of the line. The "Direction" of <theA1> is the direction of the line.
Parameters (1)theA1
Returns the direction of the line.
Returns the location point (origin) of the line.
Returns the axis placement one axis with the same location and direction as <me>.
Computes the angle between two lines in radians.
Parameters (1)theOther
Returns true if this line contains the point theP, that is, if the distance between point theP and this line is less than or equal to theLinearTolerance..
Parameters (2)thePtheLinearTolerance
Computes the distance between <me> and the point theP.
Parameters (1)theP
Computes the distance between two lines.
Parameters (1)theOther
- SquareDistance(theP: gp_Pnt): number
Computes the square distance between <me> and the point theP.
Parameters (1)theP
- SquareDistance(theOther: gp_Lin): number
Computes the square distance between two lines.
Parameters (1)theOther
Computes the line normal to the direction of <me>, passing through the point theP. Raises ConstructionError if the distance between <me> and the point theP is lower or equal to Resolution from gp because there is an infinity of solutions in 3D space.
Parameters (1)theP
- Parameters (1)
theP
- Parameters (1)
theA1
- Parameters (1)
theA2
Performs the symmetrical transformation of a line with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
Performs the symmetrical transformation of a line with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
Performs the symmetrical transformation of a line with respect to a plane. The axis placement <theA2> locates the plane of the symmetry: (Location, XDirection, YDirection).
Parameters (1)theA2
- Parameters (2)
theA1theAng
Rotates a line. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (2)
thePtheS
Scales a line. theS is the scaling value. The "Location" point (origin) of the line is modified. The "Direction" is reversed if the scale is negative.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Lin
Transforms a line with the transformation theT from class Trsf.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec): gp_Lin
Translates a line in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Lin
Translates a line from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Lin2d
Describes a line in 2D space. A line is positioned in the plane with an axis (a gp_Ax2d object) which gives the line its origin and unit vector. A line and an axis are similar objects, thus, we can convert one into the other. A line provides direct access to the majority of the edit and query functions available on its positioning axis. In addition, however, a line has specific functions for computing distances and positions.
See Also GccAna and Geom2dGcc packages which provide functions for constructing lines defined by geometric constraints gce_MakeLin2d which provides functions for more complex line constructions Geom2d_Line which provides additional functions for constructing lines and works, in particular, with the parametric equations of lines.
Constructors(4)
Creates a Line corresponding to X axis of the reference coordinate system.
- constructor(theA: gp_Ax2d): gp_Lin2d
Creates a line located with theA.
Parameters (1)theA
- constructor(theP: gp_Pnt2d, theV: gp_Dir2d): gp_Lin2d
<theP> is the location point (origin) of the line and <theV> is the direction of the line.
Parameters (2)thePtheV
- constructor(theA: number, theB: number, theC: number): gp_Lin2d
Creates the line from the equation theAX + theBY + theC = 0.0 Raises ConstructionError if std::sqrt(theAtheA + theBtheB) <= Resolution from gp. Raised if std::sqrt(theAtheA + theBtheB) <= Resolution from gp.
Parameters (3)theAtheBtheC
Instance methods(30)
- Reverse(): void
Reverses the positioning axis of this line. Note:
- Reverse assigns the result to this line, while
- Reversed creates a new one.
- SetDirection(theV: gp_Dir2d): void
Changes the direction of the line.
Parameters (1)theV
- SetLocation(theP: gp_Pnt2d): void
Changes the origin of the line.
Parameters (1)theP
- SetPosition(theA: gp_Ax2d): void
Complete redefinition of the line. The "Location" point of <theA> is the origin of the line. The "Direction" of <theA> is the direction of the line.
Parameters (1)theA
- Coefficients(theA: number, theB: number, theC: number): { theA: number; theB: number; theC: number }
Returns the normalized coefficients of the line : theA * X + theB * Y + theC = 0.
Parameters (3)theAtheBtheC
ReturnsA result object with fields:
theA: updated value from the call.theB: updated value from the call.theC: updated value from the call.
Returns the direction of the line.
Returns the location point (origin) of the line.
Returns the axis placement one axis with the same location and direction as <me>.
Computes the angle between two lines in radians.
Parameters (1)theOther
Returns true if this line contains the point theP, that is, if the distance between point theP and this line is less than or equal to theLinearTolerance.
Parameters (2)thePtheLinearTolerance
Computes the distance between <me> and the point <theP>.
Parameters (1)theP
Computes the distance between two lines.
Parameters (1)theOther
- SquareDistance(theP: gp_Pnt2d): number
Computes the square distance between <me> and the point <theP>.
Parameters (1)theP
- SquareDistance(theOther: gp_Lin2d): number
Computes the square distance between two lines.
Parameters (1)theOther
Computes the line normal to the direction of <me>, passing through the point <theP>.
Parameters (1)theP
- Parameters (1)
theP
- Parameters (1)
theA
Performs the symmetrical transformation of a line with respect to the point <theP> which is the center of the symmetry.
Parameters (1)theP
Performs the symmetrical transformation of a line with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA
- Parameters (2)
thePtheAng
Rotates a line. theP is the center of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)thePtheAng
- Parameters (2)
thePtheS
Scales a line. theS is the scaling value. Only the origin of the line is modified.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf2d): gp_Lin2d
Transforms a line with the transformation theT from class Trsf2d.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec2d): gp_Lin2d
Translates a line in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Lin2d
Translates a line from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Mat
Describes a three column, three row matrix. This sort of object is used in various vectorial or matrix computations.
Constructors(3)
Creates a matrix with null coefficients.
- constructor(theCol1: gp_XYZ, theCol2: gp_XYZ, theCol3: gp_XYZ): gp_Mat
Creates a matrix. theCol1, theCol2, theCol3 are the 3 columns of the matrix.
Parameters (3)theCol1theCol2theCol3
- constructor(theA11: number, theA12: number, theA13: number, theA21: number, theA22: number, theA23: number, theA31: number, theA32: number, theA33: number): gp_MatParameters (9)
theA11theA12theA13theA21theA22theA23theA31theA32theA33
Instance methods(35)
Assigns the three coordinates of theValue to the column of index theCol of this matrix. Raises OutOfRange if theCol < 1 or theCol > 3.
Parameters (2)theColtheValue
Assigns the number triples theCol1, theCol2, theCol3 to the three columns of this matrix.
Parameters (3)theCol1theCol2theCol3
Modifies the matrix M so that applying it to any number triple (X, Y, Z) produces the same result as the cross product of theRef and the number triple (X, Y, Z): i.e.: M * {X,Y,Z}t = theRef.Cross({X, Y ,Z}) this matrix is anti symmetric. To apply this matrix to the triplet {XYZ} is the same as to do the cross product between the triplet theRef and the triplet {XYZ}. Note: this matrix is anti-symmetric.
Parameters (1)theRef
- SetDiagonal(theX1: number, theX2: number, theX3: number): void
Modifies the main diagonal of the matrix.
The other coefficients of the matrix are not modified.
Parameters (3)theX1theX2theX3
Modifies this matrix so that applying it to any number triple (X, Y, Z) produces the same result as the scalar product of theRef and the number triple (X, Y, Z): this * (X,Y,Z) = theRef.(X,Y,Z) Note: this matrix is symmetric.
Parameters (1)theRef
- SetIdentity(): void
Modifies this matrix so that it represents the Identity matrix.
- SetRotation(theAxis: gp_XYZ, theAng: number): void
Modifies this matrix so that it represents a rotation. theAng is the angular value in radians and the XYZ axis gives the direction of the rotation. Raises ConstructionError if XYZ.Modulus() <= Resolution().
Parameters (2)theAxistheAng
Assigns the three coordinates of Value to the row of index theRow of this matrix. Raises OutOfRange if theRow < 1 or theRow > 3.
Parameters (2)theRowtheValue
Assigns the number triples theRow1, theRow2, theRow3 to the three rows of this matrix.
Parameters (3)theRow1theRow2theRow3
- SetScale(theS: number): void
Modifies the matrix so that it represents a scaling transformation, where theS is the scale factor. :
Parameters (1)theS
- SetValue(theRow: number, theCol: number, theValue: number): void
Assigns <theValue> to the coefficient of row theRow, column theCol of this matrix. Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 3.
Parameters (3)theRowtheColtheValue
Returns the column of theCol index. Raises OutOfRange if theCol < 1 or theCol > 3.
Parameters (1)theCol
- Determinant(): number
Computes the determinant of the matrix.
Returns the main diagonal of the matrix.
returns the row of theRow index. Raises OutOfRange if theRow < 1 or theRow > 3
Parameters (1)theRow
- Value(theRow: number, theCol: number): number
Returns the coefficient of range (theRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 3.
Parameters (2)theRowtheCol
- ChangeValue(theRow: number, theCol: number): number
Returns the coefficient of range (theRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 3.
Parameters (2)theRowtheCol
- IsSingular(): boolean
The Gauss LU decomposition is used to invert the matrix (see Math package) so the matrix is considered as singular if the largest pivot found is lower or equal to Resolution from gp.
- Parameters (1)
theOther
Computes the sum of this matrix and the matrix theOther for each coefficient of the matrix : <me>.Coef(i,j) + <theOther>.Coef(i,j).
Parameters (1)theOther
- Divide(theScalar: number): voidParameters (1)
theScalar
Divides all the coefficients of the matrix by Scalar.
Parameters (1)theScalar
- Invert(): void
Inverses the matrix and raises if the matrix is singular.
- Invert assigns the result to this matrix, while
- Inverted creates a new one. Warning The Gauss LU decomposition is used to invert the matrix. Consequently, the matrix is considered as singular if the largest pivot found is less than or equal to
gp::Resolution(). Exceptions Standard_ConstructionError if this matrix is singular, and therefore cannot be inverted.
- Multiplied(theOther: gp_Mat): gp_Mat
Computes the product of two matrices <me> * <Other>.
Parameters (1)theOther
- Multiplied(theScalar: number): gp_MatParameters (1)
theScalar
Computes the product of two matrices <me> = <Other> * <me>.
Parameters (1)theOther
- Multiply(theScalar: number): void
Multiplies all the coefficients of the matrix by Scalar.
Parameters (1)theScalar
- PreMultiply(theOther: gp_Mat): voidParameters (1)
theOther
- Power(N: number): voidParameters (1)
N
Computes <me> = <me> * <me> * .......* <me>, theN time. if theN = 0 <me> = Identity if theN < 0 <me> = <me>.
Invert()........... <me>.Invert(). If theN < 0 an exception will be raised if the matrix is not inversible.Parameters (1)theN
- Parameters (1)
theOther
- Subtracted(theOther: gp_Mat): gp_Mat
cOmputes for each coefficient of the matrix : <me>.Coef(i,j) - <theOther>.Coef(i,j)
Parameters (1)theOther
- Transpose(): void
- Transposed(): gp_Mat
Transposes the matrix. A(j, i) -> A (i, j).
gp_Mat2d
Describes a two column, two row matrix. This sort of object is used in various vectorial or matrix computations.
Constructors(2)
Creates a matrix with null coefficients.
- constructor(theCol1: gp_XY, theCol2: gp_XY): gp_Mat2d
theCol1, theCol2 are the 2 columns of the matrix.
Parameters (2)theCol1theCol2
Instance methods(33)
Assigns the two coordinates of theValue to the column of range theCol of this matrix Raises OutOfRange if theCol < 1 or theCol > 2.
Parameters (2)theColtheValue
Assigns the number pairs theCol1, theCol2 to the two columns of this matrix.
Parameters (2)theCol1theCol2
- SetDiagonal(theX1: number, theX2: number): void
Modifies the main diagonal of the matrix.
The other coefficients of the matrix are not modified.
Parameters (2)theX1theX2
- SetIdentity(): void
Modifies this matrix, so that it represents the Identity matrix.
- SetRotation(theAng: number): void
Modifies this matrix, so that it represents a rotation. theAng is the angular value in radian of the rotation.
Parameters (1)theAng
Assigns the two coordinates of theValue to the row of index theRow of this matrix. Raises OutOfRange if theRow < 1 or theRow > 2.
Parameters (2)theRowtheValue
Assigns the number pairs theRow1, theRow2 to the two rows of this matrix.
Parameters (2)theRow1theRow2
- SetScale(theS: number): void
Modifies the matrix such that it represents a scaling transformation, where theS is the scale factor:
Parameters (1)theS
- SetValue(theRow: number, theCol: number, theValue: number): void
Assigns <theValue> to the coefficient of row theRow, column theCol of this matrix. Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 2.
Parameters (3)theRowtheColtheValue
Returns the column of theCol index. Raises OutOfRange if theCol < 1 or theCol > 2.
Parameters (1)theCol
- Determinant(): number
Computes the determinant of the matrix.
Returns the main diagonal of the matrix.
Returns the row of index theRow. Raised if theRow < 1 or theRow > 2.
Parameters (1)theRow
- Value(theRow: number, theCol: number): number
Returns the coefficient of range (ttheheRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 2.
Parameters (2)theRowtheCol
- ChangeValue(theRow: number, theCol: number): number
Returns the coefficient of range (theRow, theCol) Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 2.
Parameters (2)theRowtheCol
- IsSingular(): boolean
Returns true if this matrix is singular (and therefore, cannot be inverted). The Gauss LU decomposition is used to invert the matrix so the matrix is considered as singular if the largest pivot found is lower or equal to Resolution from gp.
- Parameters (1)
Other
Computes the sum of this matrix and the matrix theOther.for each coefficient of the matrix :
Note:
- operator += assigns the result to this matrix, while
- operator + creates a new one.
Parameters (1)theOther
- Divide(theScalar: number): voidParameters (1)
theScalar
Divides all the coefficients of the matrix by a scalar.
Parameters (1)theScalar
- Invert(): void
Inverses the matrix and raises exception if the matrix is singular.
- Multiplied(theOther: gp_Mat2d): gp_Mat2dParameters (1)
theOther
- Multiplied(theScalar: number): gp_Mat2dParameters (1)
theScalar
Computes the product of two matrices <me> * <theOther>.
Parameters (1)theOther
- Multiply(theScalar: number): void
Multiplies all the coefficients of the matrix by a scalar.
Parameters (1)theScalar
- PreMultiply(theOther: gp_Mat2d): void
Modifies this matrix by premultiplying it by the matrix Other <me> = theOther * <me>.
Parameters (1)theOther
- Power(theN: number): voidParameters (1)
theN
computes <me> = <me> * <me> * .......* <me>, theN time. if theN = 0 <me> = Identity if theN < 0 <me> = <me>.
Invert()........... <me>.Invert(). If theN < 0 an exception can be raised if the matrix is not inversibleParameters (1)theN
- Parameters (1)
theOther
- Subtracted(theOther: gp_Mat2d): gp_Mat2d
Computes for each coefficient of the matrix :
Parameters (1)theOther
- Transpose(): void
Transposes the matrix. A(j, i) -> A (i, j).
gp_Parab
Describes a parabola in 3D space. A parabola is defined by its focal length (that is, the distance between its focus and apex) and positioned in space with a coordinate system (a gp_Ax2 object) where:
- the origin of the coordinate system is on the apex of the parabola,
- the "X Axis" of the coordinate system is the axis of symmetry; the parabola is on the positive side of this axis, and
- the origin, "X Direction" and "Y Direction" of the coordinate system define the plane of the parabola. The equation of the parabola in this coordinate system, which is the "local coordinate system" of the parabola, is: Y**2=(2*P)*X. where P, referred to as the parameter of the parabola, is the distance between the focus and the directrix (P is twice the focal length). The "main Direction" of the local coordinate system gives the normal vector to the plane of the parabola.
See Alsogce_MakeParabwhich provides functions for more complex parabola constructionsGeom_Parabolawhich provides additional functions for constructing parabolas and works, in particular, with the parametric equations of parabolas
Constructors(3)
Creates an indefinite Parabola.
- constructor(theA2: gp_Ax2, theFocal: number): gp_Parab
Creates a parabola with its local coordinate system "theA2" and it's focal length "Focal". The XDirection of theA2 defines the axis of symmetry of the parabola. The YDirection of theA2 is parallel to the directrix of the parabola. The Location point of theA2 is the vertex of the parabola Raises ConstructionError if theFocal < 0.0 Raised if theFocal < 0.0.
Parameters (2)theA2theFocal
- constructor(theD: gp_Ax1, theF: gp_Pnt): gp_Parab
theD is the directrix of the parabola and theF the focus point. The symmetry axis (XAxis) of the parabola is normal to the directrix and pass through the focus point theF, but its location point is the vertex of the parabola. The YAxis of the parabola is parallel to theD and its location point is the vertex of the parabola. The normal to the plane of the parabola is the cross product between the XAxis and the YAxis.
Parameters (2)theDtheF
Instance methods(29)
Modifies this parabola by redefining its local coordinate system so that.
- its origin and "main Direction" become those of the axis theA1 (the "X Direction" and "Y Direction" are then recomputed in the same way as for any
gp_Ax2) Raises ConstructionError if the direction of theA1 is parallel to the previous XAxis of the parabola.
Parameters (1)theA1
- its origin and "main Direction" become those of the axis theA1 (the "X Direction" and "Y Direction" are then recomputed in the same way as for any
- SetFocal(theFocal: number): void
Changes the focal distance of the parabola. Raises ConstructionError if theFocal < 0.0.
Parameters (1)theFocal
- SetLocation(theP: gp_Pnt): void
Changes the location of the parabola. It is the vertex of the parabola.
Parameters (1)theP
- SetPosition(theA2: gp_Ax2): void
Changes the local coordinate system of the parabola.
Parameters (1)theA2
Returns the main axis of the parabola. It is the axis normal to the plane of the parabola passing through the vertex of the parabola.
Computes the directrix of this parabola. The directrix is:
- a line parallel to the "Y Direction" of the local coordinate system of this parabola, and
- located on the negative side of the axis of symmetry, at a distance from the apex which is equal to the focal length of this parabola. The directrix is returned as an axis (a
gp_Ax1object), the origin of which is situated on the "X Axis" of this parabola.
- Focal(): number
Returns the distance between the vertex and the focus of the parabola.
- Computes the focus of the parabola.
Returns the vertex of the parabola. It is the "Location" point of the coordinate system of the parabola.
- Parameter(): number
Computes the parameter of the parabola. It is the distance between the focus and the directrix of the parabola. This distance is twice the focal length.
Returns the local coordinate system of the parabola.
Returns the symmetry axis of the parabola. The location point of the axis is the vertex of the parabola.
It is an axis parallel to the directrix of the parabola. The location point of this axis is the vertex of the parabola.
- Parameters (1)
theP
- Parameters (1)
theA1
- Parameters (1)
theA2
Performs the symmetrical transformation of a parabola with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
Performs the symmetrical transformation of a parabola with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
Performs the symmetrical transformation of a parabola with respect to a plane. The axis placement theA2 locates the plane of the symmetry (Location, XDirection, YDirection).
Parameters (1)theA2
- Parameters (2)
theA1theAng
Rotates a parabola. theA1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (2)
thePtheS
Scales a parabola. theS is the scaling value. If theS is negative the direction of the symmetry axis XAxis is reversed and the direction of the YAxis too.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Parab
Transforms a parabola with the transformation theT from class Trsf.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec): gp_Parab
Translates a parabola in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Parab
Translates a parabola from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Parab2d
Describes a parabola in the plane (2D space). A parabola is defined by its focal length (that is, the distance between its focus and apex) and positioned in the plane with a coordinate system (a gp_Ax22d object) where:
- the origin of the coordinate system is on the apex of the parabola, and
- the "X Axis" of the coordinate system is the axis of symmetry; the parabola is on the positive side of this axis. This coordinate system is the "local coordinate system" of the parabola. Its orientation (direct or indirect sense) gives an implicit orientation to the parabola.
In this coordinate system, the equation for the parabola is: Y**2=(2*P)*X. where P, referred to as the parameter of the parabola, is the distance between the focus and the directrix (P is twice the focal length).
See Also GCE2d_MakeParab2d which provides functions for more complex parabola constructionsGeom2d_Parabolawhich provides additional functions for constructing parabolas and works, in particular, with the parametric equations of parabolas
Constructors(4)
Creates an indefinite parabola.
- constructor(theAxes: gp_Ax22d, theFocalLength: number): gp_Parab2d
Creates a parabola with its vertex point, its axis of symmetry ("XAxis"), correspond Y-axis and its focal length. Warnings : It is possible to have FocalLength = 0. In this case, the parabola looks like a line, which is parallel to the symmetry-axis. Raises ConstructionError if Focal < 0.0.
Parameters (2)theAxestheFocalLength
- constructor(theMirrorAxis: gp_Ax2d, theFocalLength: number, theSense?: boolean): gp_Parab2d
Creates a parabola with its vertex point, its axis of symmetry ("XAxis") and its focal length. The sense of parametrization is given by theSense. If theSense == TRUE (by default) then right-handed coordinate system is used, otherwise - left-handed. Warnings : It is possible to have FocalLength = 0. In this case, the parabola looks like a line, which is parallel to the symmetry-axis. Raises ConstructionError if FocalLength < 0.0.
Parameters (3)theMirrorAxistheFocalLengththeSense
- constructor(theDirectrix: gp_Ax2d, theFocus: gp_Pnt2d, theSense?: boolean): gp_Parab2d
Creates a parabola with the directrix and the focus point. Y-axis of the parabola (in User Coordinate System - UCS) is the direction of theDirectrix. X-axis always directs from theDirectrix to theFocus point and always comes through theFocus. Apex of the parabola is a middle point between the theFocus and the intersection point of theDirectrix and the X-axis. Warnings : It is possible to have FocalLength = 0 (when theFocus lies in theDirectrix). In this case, X-direction of the parabola is defined by theSense parameter. If theSense == TRUE (by default) then right-handed coordinate system is used, otherwise - left-handed. Result parabola will look like a line, which is perpendicular to the directrix.
Parameters (3)theDirectrixtheFocustheSense
Instance methods(29)
- SetFocal(theFocal: number): void
Changes the focal distance of the parabola Warnings : It is possible to have theFocal = 0. Raises ConstructionError if theFocal < 0.0.
Parameters (1)theFocal
- SetLocation(theP: gp_Pnt2d): void
Changes the "Location" point of the parabola. It is the vertex of the parabola.
Parameters (1)theP
- SetMirrorAxis(theA: gp_Ax2d): void
Modifies this parabola, by redefining its local coordinate system so that its origin and "X Direction" become those of the axis MA. The "Y Direction" of the local coordinate system is then recomputed. The orientation of the local coordinate system is not modified.
Parameters (1)theA
Changes the local coordinate system of the parabola. The "Location" point of A becomes the vertex of the parabola.
Parameters (1)theA
- Coefficients(theA: number, theB: number, theC: number, theD: number, theE: number, theF: number): { theA: number; theB: number; theC: number; theD: number; theE: number; theF: number }
Computes the coefficients of the implicit equation of the parabola (in WCS - World Coordinate System).
Parameters (6)theAtheBtheCtheDtheEtheF
ReturnsA result object with fields:
theA: updated value from the call.theB: updated value from the call.theC: updated value from the call.theD: updated value from the call.theE: updated value from the call.theF: updated value from the call.
Computes the directrix of the parabola. The directrix is:
- a line parallel to the "Y Direction" of the local coordinate system of this parabola, and
- located on the negative side of the axis of symmetry, at a distance from the apex which is equal to the focal length of this parabola. The directrix is returned as an axis (a
gp_Ax2dobject), the origin of which is situated on the "X Axis" of this parabola.
- Focal(): number
Returns the distance between the vertex and the focus of the parabola.
Returns the focus of the parabola.
Returns the vertex of the parabola.
Returns the symmetry axis of the parabola. The "Location" point of this axis is the vertex of the parabola.
Returns the local coordinate system of the parabola. The "Location" point of this axis is the vertex of the parabola.
- Parameter(): number
Returns the distance between the focus and the directrix of the parabola.
- Reverse(): void
Reverses the orientation of the local coordinate system of this parabola (the "Y Direction" is reversed). Therefore, the implicit orientation of this parabola is reversed. Note:
- Reverse assigns the result to this parabola, while
- Reversed creates a new one.
- IsDirect(): boolean
Returns true if the local coordinate system is direct and false in the other case.
- Parameters (1)
theP
- Parameters (1)
theA
- Mirrored(theP: gp_Pnt2d): gp_Parab2d
Performs the symmetrical transformation of a parabola with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
- Mirrored(theA: gp_Ax2d): gp_Parab2d
Performs the symmetrical transformation of a parabola with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA
- Parameters (2)
thePtheAng
- Rotated(theP: gp_Pnt2d, theAng: number): gp_Parab2d
Rotates a parabola. theP is the center of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)thePtheAng
- Parameters (2)
thePtheS
- Scaled(theP: gp_Pnt2d, theS: number): gp_Parab2d
Scales a parabola. theS is the scaling value. If theS is negative the direction of the symmetry axis "XAxis" is reversed and the direction of the "YAxis" too.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf2d): gp_Parab2d
Transforms an parabola with the transformation theT from class Trsf2d.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec2d): gp_Parab2d
Translates a parabola in the direction of the vectorthe theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Parab2d
Translates a parabola from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Pln
Describes a plane.
A plane is positioned in space with a coordinate system (a gp_Ax3 object), such that the plane is defined by the origin, "X Direction" and "Y Direction" of this coordinate system, which is the "local coordinate system" of the plane. The "main Direction" of the coordinate system is a vector normal to the plane.
It gives the plane an implicit orientation such that the plane is said to be "direct", if the coordinate system is right-handed, or "indirect" in the other case.
Note: when a gp_Pln plane is converted into a Geom_Plane plane, some implicit properties of its local coordinate system are used explicitly:
- its origin defines the origin of the two parameters of the planar surface,
- its implicit orientation is also that of the
Geom_Plane. See Alsogce_MakePlnwhich provides functions for more complex plane constructionsGeom_Planewhich provides additional functions for constructing planes and works, in particular, with the parametric equations of planes
Constructors(4)
Creates a plane coincident with OXY plane of the reference coordinate system.
- constructor(theA3: gp_Ax3): gp_Pln
The coordinate system of the plane is defined with the axis placement theA3. The "Direction" of theA3 defines the normal to the plane. The "Location" of theA3 defines the location (origin) of the plane. The "XDirection" and "YDirection" of theA3 define the "XAxis" and the "YAxis" of the plane used to parametrize the plane.
Parameters (1)theA3
- constructor(theP: gp_Pnt, theV: gp_Dir): gp_Pln
Creates a plane with the "Location" point <theP> and the normal direction <theV>.
Parameters (2)thePtheV
- constructor(theA: number, theB: number, theC: number, theD: number): gp_Pln
Creates a plane from its cartesian equation :
Raises ConstructionError if std::sqrt (theAtheA + theBtheB + theC*theC) <= Resolution from gp.
Parameters (4)theAtheBtheCtheD
Instance methods(39)
- Coefficients(theA: number, theB: number, theC: number, theD: number): { theA: number; theB: number; theC: number; theD: number }
Returns the coefficients of the plane's cartesian equation:
Parameters (4)theAtheBtheCtheD
ReturnsA result object with fields:
theA: updated value from the call.theB: updated value from the call.theC: updated value from the call.theD: updated value from the call.
Modifies this plane, by redefining its local coordinate system so that.
- its origin and "main Direction" become those of the axis theA1 (the "X Direction" and "Y Direction" are then recomputed). Raises ConstructionError if the theA1 is parallel to the "XAxis" of the plane.
Parameters (1)theA1
- SetLocation(theLoc: gp_Pnt): void
Changes the origin of the plane.
Parameters (1)theLoc
- SetPosition(theA3: gp_Ax3): void
Changes the local coordinate system of the plane.
Parameters (1)theA3
- UReverse(): void
Reverses the U parametrization of the plane reversing the XAxis.
- VReverse(): void
Reverses the V parametrization of the plane reversing the YAxis.
- Direct(): boolean
Returns true if the Ax3 is right handed.
Returns the plane's normal Axis.
Returns the plane's location (origin).
Returns the local coordinate system of the plane.
Computes the distance between <me> and the point <theP>.
Parameters (1)theP
Computes the distance between <me> and the line <theL>.
Parameters (1)theL
Computes the distance between two planes.
Parameters (1)theOther
- SignedDistance(theP: gp_Pnt): number
Computes the signed distance between <me> and the point <theP>. The sign of the distance indicates on which side of the plane the point is located:
- positive sign: the point is located in the direction of the plane normal,
- negative sign: the point is located in the opposite direction to the plane normal,
- zero: the point is located on the plane.
Parameters (1)theP
- SignedDistance(theL: gp_Lin): number
Computes the signed distance between <me> and the line <theL>. The sign of the distance indicates on which side of the plane the line is located:
- positive sign: the line is located in the direction of the plane normal,
- negative sign: the line is located in the opposite direction to the plane normal,
- zero: the line intersects the plane.
Parameters (1)theL
- SignedDistance(theOther: gp_Pln): number
Computes the signed distance between two planes. The sign of the distance indicates on which side of <me> the other plane is located:
- positive sign: the other plane is located in the direction of the plane normal,
- negative sign: the other plane is located in the opposite direction to the plane normal,
- zero: the planes intersect.
Parameters (1)theOther
- SquareDistance(theP: gp_Pnt): number
Computes the square distance between <me> and the point <theP>.
Parameters (1)theP
- SquareDistance(theL: gp_Lin): number
Computes the square distance between <me> and the line <theL>.
Parameters (1)theL
- SquareDistance(theOther: gp_Pln): number
Computes the square distance between two planes.
Parameters (1)theOther
Returns the X axis of the plane.
Returns the Y axis of the plane.
Returns true if this plane contains the point theP. This means that.
- the distance between point theP and this plane is less than or equal to theLinearTolerance, or
- line L is normal to the "main Axis" of the local coordinate system of this plane, within the tolerance AngularTolerance, and the distance between the origin of line L and this plane is less than or equal to theLinearTolerance.
Parameters (2)thePtheLinearTolerance
Returns true if this plane contains the line theL. This means that.
- the distance between point P and this plane is less than or equal to LinearTolerance, or
- line theL is normal to the "main Axis" of the local coordinate system of this plane, within the tolerance theAngularTolerance, and the distance between the origin of line theL and this plane is less than or equal to theLinearTolerance.
Parameters (3)theLtheLinearTolerancetheAngularTolerance
- Parameters (1)
theP
- Parameters (1)
theA1
- Parameters (1)
theA2
Performs the symmetrical transformation of a plane with respect to the point <theP> which is the center of the symmetry Warnings : The normal direction to the plane is not changed. The "XAxis" and the "YAxis" are reversed.
Parameters (1)theP
Performs the symmetrical transformation of a plane with respect to an axis placement which is the axis of the symmetry. The transformation is performed on the "Location" point, on the "XAxis" and the "YAxis". The resulting normal direction is the cross product between the "XDirection" and the "YDirection" after transformation if the initial plane was right handed, else it is the opposite.
Parameters (1)theA1
Performs the symmetrical transformation of a plane with respect to an axis placement. The axis placement <A2> locates the plane of the symmetry. The transformation is performed on the "Location" point, on the "XAxis" and the "YAxis". The resulting normal direction is the cross product between the "XDirection" and the "YDirection" after transformation if the initial plane was right handed, else it is the opposite.
Parameters (1)theA2
- Parameters (2)
theA1theAng
Rotates a plane. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (2)
thePtheS
Scales a plane. theS is the scaling value.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Pln
Transforms a plane with the transformation theT from class Trsf. The transformation is performed on the "Location" point, on the "XAxis" and the "YAxis". The resulting normal direction is the cross product between the "XDirection" and the "YDirection" after transformation.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec): gp_Pln
Translates a plane in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Pln
Translates a plane from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Pnt
Defines a 3D cartesian point.
Constructors(3)
Creates a point with zero coordinates.
- constructor(theCoord: gp_XYZ): gp_Pnt
Creates a point from a XYZ object.
Parameters (1)theCoord
- constructor(theXp: number, theYp: number, theZp: number): gp_Pnt
Creates a point with its 3 cartesian's coordinates: theXp, theYp, theZp.
Parameters (3)theXptheYptheZp
Instance methods(34)
- SetCoord(theIndex: number, theXi: number): void
Changes the coordinate of range theIndex: theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raised if theIndex != {1, 2, 3}.
Parameters (2)theIndextheXi
- SetCoord(theXp: number, theYp: number, theZp: number): void
For this point, assigns the values theXp, theYp and theZp to its three coordinates.
Parameters (3)theXptheYptheZp
- SetX(theX: number): void
Assigns the given value to the X coordinate of this point.
Parameters (1)theX
- SetY(theY: number): void
Assigns the given value to the Y coordinate of this point.
Parameters (1)theY
- SetZ(theZ: number): void
Assigns the given value to the Z coordinate of this point.
Parameters (1)theZ
Assigns the three coordinates of theCoord to this point.
Parameters (1)theCoord
- Coord(theIndex: number): number
Returns the coordinate of corresponding to the value of theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned Raises OutOfRange if theIndex != {1, 2, 3}. Raised if theIndex != {1, 2, 3}.
Parameters (1)theIndex
- Coord(theXp: number, theYp: number, theZp: number): { theXp: number; theYp: number; theZp: number }
For this point gives its three coordinates theXp, theYp and theZp.
Parameters (3)theXptheYptheZp
ReturnsA result object with fields:
theXp: updated value from the call.theYp: updated value from the call.theZp: updated value from the call.
For this point, returns its three coordinates as a XYZ object.
- X(): number
For this point, returns its X coordinate.
- Y(): number
For this point, returns its Y coordinate.
- Z(): number
For this point, returns its Z coordinate.
For this point, returns its three coordinates as a XYZ object.
Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.
- BaryCenter(theAlpha: number, theP: gp_Pnt, theBeta: number): void
Assigns the result of the following expression to this point (theAlphathis + theBetatheP) / (theAlpha + theBeta).
Parameters (3)theAlphathePtheBeta
Comparison Returns True if the distance between the two points is lower or equal to theLinearTolerance.
Parameters (2)theOthertheLinearTolerance
Computes the distance between two points.
Parameters (1)theOther
- SquareDistance(theOther: gp_Pnt): number
Computes the square distance between two points.
Parameters (1)theOther
Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
- Parameters (1)
theA1
- Parameters (1)
theA2
Performs the symmetrical transformation of a point with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theP
Performs the symmetrical transformation of a point with respect to a plane. The axis placement theA2 locates the plane of the symmetry : (Location, XDirection, YDirection).
Parameters (1)theA1
Rotates a point. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (1)theA2
- Parameters (2)
theA1theAng
- Parameters (2)
theA1theAng
Scales a point. theS is the scaling value.
Parameters (2)thePtheS
- Parameters (2)
thePtheS
Transforms a point with the transformation T.
Parameters (1)theT
- Transformed(theT: gp_Trsf): gp_PntParameters (1)
theT
Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
Translates a point from the point theP1 to the point theP2.
Parameters (2)theP1theP2
- Translated(theV: gp_Vec): gp_PntParameters (1)
theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_PntParameters (2)
theP1theP2
gp_Pnt2d
Defines a non-persistent 2D cartesian point.
Constructors(3)
Creates a point with zero coordinates.
- constructor(theCoord: gp_XY): gp_Pnt2d
Creates a point with a doublet of coordinates.
Parameters (1)theCoord
- constructor(theXp: number, theYp: number): gp_Pnt2d
Creates a point with its 2 cartesian's coordinates: theXp, theYp.
Parameters (2)theXptheYp
Instance methods(29)
- SetCoord(theIndex: number, theXi: number): void
Assigns the value Xi to the coordinate that corresponds to theIndex: theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}.
Parameters (2)theIndextheXi
- SetCoord(theXp: number, theYp: number): void
For this point, assigns the values theXp and theYp to its two coordinates.
Parameters (2)theXptheYp
- SetX(theX: number): void
Assigns the given value to the X coordinate of this point.
Parameters (1)theX
- SetY(theY: number): void
Assigns the given value to the Y coordinate of this point.
Parameters (1)theY
Assigns the two coordinates of Coord to this point.
Parameters (1)theCoord
- Coord(theIndex: number): number
Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}.
Parameters (1)theIndex
- Coord(theXp: number, theYp: number): { theXp: number; theYp: number }
For this point returns its two coordinates as a number pair.
Parameters (2)theXptheYp
ReturnsA result object with fields:
theXp: updated value from the call.theYp: updated value from the call.
For this point, returns its two coordinates as a number pair.
- X(): number
For this point, returns its X coordinate.
- Y(): number
For this point, returns its Y coordinate.
For this point, returns its two coordinates as a number pair.
- ChangeCoord(): gp_XY
Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.
Comparison Returns True if the distance between the two points is lower or equal to theLinearTolerance.
Parameters (2)theOthertheLinearTolerance
Computes the distance between two points.
Parameters (1)theOther
- SquareDistance(theOther: gp_Pnt2d): number
Computes the square distance between two points.
Parameters (1)theOther
Performs the symmetrical transformation of a point with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
- Parameters (1)
theA
Performs the symmetrical transformation of a point with respect to an axis placement which is the axis.
Parameters (1)theP
- Parameters (1)
theA
Rotates a point. theA1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters (2)thePtheAng
- Parameters (2)
thePtheAng
Scales a point. theS is the scaling value.
Parameters (2)thePtheS
- Parameters (2)
thePtheS
Transforms a point with the transformation theT.
Parameters (1)theT
- Transformed(theT: gp_Trsf2d): gp_Pnt2dParameters (1)
theT
Translates a point in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
Translates a point from the point theP1 to the point theP2.
Parameters (2)theP1theP2
- Translated(theV: gp_Vec2d): gp_Pnt2dParameters (1)
theV
- Translated(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Pnt2dParameters (2)
theP1theP2
gp_Quaternion
Represents operation of rotation in 3d space as quaternion and implements operations with rotations basing on quaternion mathematics.
In addition, provides methods for conversion to and from other representations of rotation (3*3 matrix, vector and angle, Euler angles)
Constructors(6)
Creates an identity quaternion.
- constructor(theMat: gp_Mat): gp_Quaternion
Creates quaternion from rotation matrix 3*3 (which should be orthonormal skew-symmetric matrix).
Parameters (1)theMat
- constructor(theVecFrom: gp_Vec, theVecTo: gp_Vec): gp_Quaternion
Creates quaternion representing shortest-arc rotation operator producing vector theVecTo from vector theVecFrom.
Parameters (2)theVecFromtheVecTo
- constructor(theAxis: gp_Vec, theAngle: number): gp_Quaternion
Creates quaternion representing rotation on angle theAngle around vector theAxis.
Parameters (2)theAxistheAngle
- constructor(theVecFrom: gp_Vec, theVecTo: gp_Vec, theHelpCrossVec: gp_Vec): gp_Quaternion
Creates quaternion representing shortest-arc rotation operator producing vector theVecTo from vector theVecFrom. Additional vector theHelpCrossVec defines preferred direction for rotation and is used when theVecTo and theVecFrom are directed oppositely.
Parameters (3)theVecFromtheVecTotheHelpCrossVec
- constructor(theX: number, theY: number, theZ: number, theW: number): gp_Quaternion
Creates quaternion directly from component values.
Parameters (4)theXtheYtheZtheW
Instance methods(37)
- IsEqual(theOther: gp_Quaternion): boolean
Simple equal test without precision.
Parameters (1)theOther
- SetRotation(theVecFrom: gp_Vec, theVecTo: gp_Vec): void
Sets quaternion to shortest-arc rotation producing vector theVecTo from vector theVecFrom. If vectors theVecFrom and theVecTo are opposite then rotation axis is computed as theVecFrom ^ (1,0,0) or theVecFrom ^ (0,0,1).
Parameters (2)theVecFromtheVecTo
- SetRotation(theVecFrom: gp_Vec, theVecTo: gp_Vec, theHelpCrossVec: gp_Vec): void
Sets quaternion to shortest-arc rotation producing vector theVecTo from vector theVecFrom. If vectors theVecFrom and theVecTo are opposite then rotation axis is computed as theVecFrom ^ theHelpCrossVec.
Parameters (3)theVecFromtheVecTotheHelpCrossVec
- SetVectorAndAngle(theAxis: gp_Vec, theAngle: number): void
Create a unit quaternion from Axis+Angle representation.
Parameters (2)theAxistheAngle
- GetVectorAndAngle(theAxis: gp_Vec, theAngle: number): { theAngle: number }
Convert a quaternion to Axis+Angle representation, preserve the axis direction and angle from -PI to +PI.
Parameters (2)theAxis—Mutated in place; read the updated value from this argument after the call.theAngle
ReturnsA result object with fields:
theAngle: updated value from the call.
Create a unit quaternion by rotation matrix matrix must contain only rotation (not scale or shear).
For numerical stability we find first the greatest component of quaternion and than search others from this oneParameters (1)theMat
Returns rotation operation as 3*3 matrix.
- SetEulerAngles(theOrder: gp_EulerSequence, theAlpha: number, theBeta: number, theGamma: number): void
Create a unit quaternion representing rotation defined by generalized Euler angles.
Parameters (4)theOrdertheAlphatheBetatheGamma
- GetEulerAngles(theOrder: gp_EulerSequence, theAlpha: number, theBeta: number, theGamma: number): { theAlpha: number; theBeta: number; theGamma: number }
Returns Euler angles describing current rotation.
Parameters (4)theOrdertheAlphatheBetatheGamma
ReturnsA result object with fields:
theAlpha: updated value from the call.theBeta: updated value from the call.theGamma: updated value from the call.
- Set(theX: number, theY: number, theZ: number, theW: number): voidParameters (4)
theXtheYtheZtheW
- Set(theQuaternion: gp_Quaternion): voidParameters (1)
theQuaternion
- X(): number
- Y(): number
- Z(): number
- W(): number
- SetIdent(): void
Make identity quaternion (zero-rotation).
- Reverse(): void
Reverse direction of rotation (conjugate quaternion).
Return rotation with reversed direction (conjugated quaternion).
- Invert(): void
Inverts quaternion (both rotation direction and norm).
Return inversed quaternion q^-1.
- SquareNorm(): number
Returns square norm of quaternion.
- Norm(): number
Returns norm of quaternion.
- Scale(theScale: number): void
Scale all components by quaternion by theScale; note that rotation is not changed by this operation (except 0-scaling).
Parameters (1)theScale
- Scaled(theScale: number): gp_Quaternion
Returns scaled quaternion.
Parameters (1)theScale
- StabilizeLength(): void
Stabilize quaternion length within 1 - 1/4. This operation is a lot faster than normalization and preserve length goes to 0 or infinity.
- Normalize(): void
Scale quaternion that its norm goes to 1. The appearing of 0 magnitude or near is a error, so we can be sure that can divide by magnitude.
Returns quaternion scaled so that its norm goes to 1.
Returns quaternion with all components negated. Note that this operation does not affect neither rotation operator defined by quaternion nor its norm.
- Added(theOther: gp_Quaternion): gp_Quaternion
Makes sum of quaternion components; result is "rotations mix".
Parameters (1)theOther
- Subtracted(theOther: gp_Quaternion): gp_Quaternion
Makes difference of quaternion components; result is "rotations mix".
Parameters (1)theOther
- Multiplied(theOther: gp_Quaternion): gp_Quaternion
Multiply function - work the same as Matrices multiplying.
Result is rotation combination: q' than q (here q=this, q'=theQ). Notices that:
Parameters (1)theOther
- Add(theOther: gp_Quaternion): void
Adds components of other quaternion; result is "rotations mix".
Parameters (1)theOther
- Subtract(theOther: gp_Quaternion): void
Subtracts components of other quaternion; result is "rotations mix".
Parameters (1)theOther
- Multiply(theOther: gp_Quaternion): void
Adds rotation by multiplication.
Parameters (1)theOther
Rotates vector by quaternion as rotation operator.
Parameters (1)theVec
- Dot(theOther: gp_Quaternion): number
Computes inner product / scalar product / Dot.
Parameters (1)theOther
- GetRotationAngle(): number
Return rotation angle from -PI to PI.
gp_QuaternionNLerp
Class perform linear interpolation (approximate rotation interpolation), result quaternion nonunit, its length lay between. sqrt(2)/2 and 1.0.
Constructors(2)
Empty constructor,.
- constructor(theQStart: gp_Quaternion, theQEnd: gp_Quaternion): gp_QuaternionNLerp
Constructor with initialization.
Parameters (2)theQStarttheQEnd
Static methods(1)
- Interpolate(theQStart: gp_Quaternion, theQEnd: gp_Quaternion, theT: number): gp_Quaternion
Compute interpolated quaternion between two quaternions.
Parameters (3)theQStarttheQEndtheT—normalized interpolation coefficient within 0..1 range, with 0 pointing to theStart and 1 to theEnd.
Instance methods(3)
- Interpolate(theT: number, theResultQ: gp_Quaternion): void
Set interpolated quaternion for theT position (from 0.0 to 1.0).
Parameters (2)theTtheResultQ—Mutated in place; read the updated value from this argument after the call.
- Init(theQStart: gp_Quaternion, theQEnd: gp_Quaternion): void
Initialize the tool with Start and End values.
Parameters (2)theQStarttheQEnd
- InitFromUnit(theQStart: gp_Quaternion, theQEnd: gp_Quaternion): void
Initialize the tool with Start and End unit quaternions.
Parameters (2)theQStarttheQEnd
gp_QuaternionSLerp
Perform Spherical Linear Interpolation of the quaternions, return unit length quaternion.
Constructors(2)
Empty constructor,.
- constructor(theQStart: gp_Quaternion, theQEnd: gp_Quaternion): gp_QuaternionSLerp
Constructor with initialization.
Parameters (2)theQStarttheQEnd
Static methods(1)
- Interpolate(theQStart: gp_Quaternion, theQEnd: gp_Quaternion, theT: number): gp_Quaternion
Compute interpolated quaternion between two quaternions.
Parameters (3)theQStarttheQEndtheT—normalized interpolation coefficient within 0..1 range, with 0 pointing to theStart and 1 to theEnd.
Instance methods(3)
- Interpolate(theT: number, theResultQ: gp_Quaternion): void
Set interpolated quaternion for theT position (from 0.0 to 1.0).
Parameters (2)theTtheResultQ—Mutated in place; read the updated value from this argument after the call.
- Init(theQStart: gp_Quaternion, theQEnd: gp_Quaternion): void
Initialize the tool with Start and End values.
Parameters (2)theQStarttheQEnd
- InitFromUnit(theQStart: gp_Quaternion, theQEnd: gp_Quaternion): void
Initialize the tool with Start and End unit quaternions.
Parameters (2)theQStarttheQEnd
gp_Sphere
Describes a sphere. A sphere is defined by its radius and positioned in space with a coordinate system (a gp_Ax3 object). The origin of the coordinate system is the center of the sphere. This coordinate system is the "local coordinate system" of the sphere. Note: when a gp_Sphere sphere is converted into a Geom_SphericalSurface sphere, some implicit properties of its local coordinate system are used explicitly:
- its origin, "X Direction", "Y Direction" and "main Direction" are used directly to define the parametric directions on the sphere and the origin of the parameters,
- its implicit orientation (right-handed or left-handed) gives the orientation (direct, indirect) to the
Geom_SphericalSurfacesphere. See Also gce_MakeSphere which provides functions for more complex sphere constructionsGeom_SphericalSurfacewhich provides additional functions for constructing spheres and works, in particular, with the parametric equations of spheres.
Constructors(2)
Creates an indefinite sphere.
- constructor(theA3: gp_Ax3, theRadius: number): gp_Sphere
Constructs a sphere with radius theRadius, centered on the origin of theA3. theA3 is the local coordinate system of the sphere. Warnings: It is not forbidden to create a sphere with null radius. Raises ConstructionError if theRadius < 0.0.
Parameters (2)theA3theRadius
Instance methods(30)
- SetLocation(theLoc: gp_Pnt): void
Changes the center of the sphere.
Parameters (1)theLoc
- SetPosition(theA3: gp_Ax3): void
Changes the local coordinate system of the sphere.
Parameters (1)theA3
- SetRadius(theR: number): void
Assigns theR the radius of the Sphere. Warnings : It is not forbidden to create a sphere with null radius. Raises ConstructionError if theR < 0.0.
Parameters (1)theR
- Area(): number
Computes the area of the sphere.
- Coefficients(theA1: number, theA2: number, theA3: number, theB1: number, theB2: number, theB3: number, theC1: number, theC2: number, theC3: number, theD: number): { theA1: number; theA2: number; theA3: number; theB1: number; theB2: number; theB3: number; theC1: number; theC2: number; theC3: number; theD: number }
Computes the coefficients of the implicit equation of the quadric in the absolute cartesian coordinates system :
Parameters (10)theA1theA2theA3theB1theB2theB3theC1theC2theC3theD
ReturnsA result object with fields:
theA1: updated value from the call.theA2: updated value from the call.theA3: updated value from the call.theB1: updated value from the call.theB2: updated value from the call.theB3: updated value from the call.theC1: updated value from the call.theC2: updated value from the call.theC3: updated value from the call.theD: updated value from the call.
- UReverse(): void
Reverses the U parametrization of the sphere reversing the YAxis.
- VReverse(): void
Reverses the V parametrization of the sphere reversing the ZAxis.
- Direct(): boolean
Returns true if the local coordinate system of this sphere is right-handed.
-- Purpose ; Returns the center of the sphere.
Returns the local coordinates system of the sphere.
- Radius(): number
Returns the radius of the sphere.
- Volume(): number
Computes the volume of the sphere.
Returns the axis X of the sphere.
Returns the axis Y of the sphere.
- Parameters (1)
theP
- Parameters (1)
theA1
- Parameters (1)
theA2
Performs the symmetrical transformation of a sphere with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
Performs the symmetrical transformation of a sphere with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
Performs the symmetrical transformation of a sphere with respect to a plane. The axis placement theA2 locates the plane of the of the symmetry : (Location, XDirection, YDirection).
Parameters (1)theA2
- Parameters (2)
theA1theAng
Rotates a sphere. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (2)
thePtheS
Scales a sphere. theS is the scaling value. The absolute value of S is used to scale the sphere.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Sphere
Transforms a sphere with the transformation theT from class Trsf.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec): gp_Sphere
Translates a sphere in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Sphere
Translates a sphere from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Torus
Describes a torus. A torus is defined by its major and minor radii and positioned in space with a coordinate system (a gp_Ax3 object) as follows:
- The origin of the coordinate system is the center of the torus;
- The surface is obtained by rotating a circle of radius equal to the minor radius of the torus about the "main Direction" of the coordinate system. This circle is located in the plane defined by the origin, the "X Direction" and the "main Direction" of the coordinate system. It is centered on the "X Axis" of this coordinate system, and located at a distance, from the origin of this coordinate system, equal to the major radius of the torus;
- The "X Direction" and "Y Direction" define the reference plane of the torus. The coordinate system described above is the "local coordinate system" of the torus. Note: when a
gp_Torustorus is converted into aGeom_ToroidalSurfacetorus, some implicit properties of its local coordinate system are used explicitly: - its origin, "X Direction", "Y Direction" and "main Direction" are used directly to define the parametric directions on the torus and the origin of the parameters,
- its implicit orientation (right-handed or left-handed) gives the orientation (direct, indirect) to the
Geom_ToroidalSurfacetorus. See Also gce_MakeTorus which provides functions for more complex torus constructionsGeom_ToroidalSurfacewhich provides additional functions for constructing tori and works, in particular, with the parametric equations of tori.
Constructors(2)
creates an indefinite Torus.
- constructor(theA3: gp_Ax3, theMajorRadius: number, theMinorRadius: number): gp_Torus
a torus centered on the origin of coordinate system theA3, with major radius theMajorRadius and minor radius theMinorRadius, and with the reference plane defined by the origin, the "X Direction" and the "Y Direction" of theA3. Warnings : It is not forbidden to create a torus with theMajorRadius = theMinorRadius = 0.0 Raises ConstructionError if theMinorRadius < 0.0 or if theMajorRadius < 0.0
Parameters (3)theA3theMajorRadiustheMinorRadius
Instance methods(34)
Modifies this torus, by redefining its local coordinate system so that:
- its origin and "main Direction" become those of the axis theA1 (the "X Direction" and "Y Direction" are then recomputed). Raises ConstructionError if the direction of theA1 is parallel to the "XDirection" of the coordinate system of the toroidal surface.
Parameters (1)theA1
- SetLocation(theLoc: gp_Pnt): void
Changes the location of the torus.
Parameters (1)theLoc
- SetMajorRadius(theMajorRadius: number): void
Assigns value to the major radius of this torus. Raises ConstructionError if theMajorRadius - MinorRadius <= Resolution().
Parameters (1)theMajorRadius
- SetMinorRadius(theMinorRadius: number): void
Assigns value to the minor radius of this torus. Raises ConstructionError if theMinorRadius < 0.0 or if MajorRadius - theMinorRadius <= Resolution from gp.
Parameters (1)theMinorRadius
- SetPosition(theA3: gp_Ax3): void
Changes the local coordinate system of the surface.
Parameters (1)theA3
- Area(): number
Computes the area of the torus.
- UReverse(): void
Reverses the U parametrization of the torus reversing the YAxis.
- VReverse(): void
Reverses the V parametrization of the torus reversing the ZAxis.
- Direct(): boolean
returns true if the Ax3, the local coordinate system of this torus, is right handed.
returns the symmetry axis of the torus.
- Coefficients(theCoef: NCollection_Array1_double): void
Computes the coefficients of the implicit equation of the surface in the absolute Cartesian coordinate system:
Raises DimensionError if the length of theCoef is lower than 35.
Parameters (1)theCoef—Mutated in place; read the updated value from this argument after the call.
Returns the Torus's location.
Returns the local coordinates system of the torus.
- MajorRadius(): number
returns the major radius of the torus.
- MinorRadius(): number
returns the minor radius of the torus.
- Volume(): number
Computes the volume of the torus.
returns the axis X of the torus.
returns the axis Y of the torus.
- Parameters (1)
theP
- Parameters (1)
theA1
- Parameters (1)
theA2
Performs the symmetrical transformation of a torus with respect to the point theP which is the center of the symmetry.
Parameters (1)theP
Performs the symmetrical transformation of a torus with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
Performs the symmetrical transformation of a torus with respect to a plane. The axis placement theA2 locates the plane of the of the symmetry : (Location, XDirection, YDirection).
Parameters (1)theA2
- Parameters (2)
theA1theAng
Rotates a torus. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Parameters (2)
thePtheS
Scales a torus. S is the scaling value. The absolute value of S is used to scale the torus.
Parameters (2)thePtheS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf): gp_Torus
Transforms a torus with the transformation theT from class Trsf.
Parameters (1)theT
- Parameters (1)
theV
- Parameters (2)
theP1theP2
- Translated(theV: gp_Vec): gp_Torus
Translates a torus in the direction of the vector theV. The magnitude of the translation is the vector's magnitude.
Parameters (1)theV
- Translated(theP1: gp_Pnt, theP2: gp_Pnt): gp_Torus
Translates a torus from the point theP1 to the point theP2.
Parameters (2)theP1theP2
gp_Trsf
Defines a non-persistent transformation in 3D space. The following transformations are implemented : . Translation, Rotation, Scale . Symmetry with respect to a point, a line, a plane. Complex transformations can be obtained by combining the previous elementary transformations using the method Multiply. The transformations can be represented as follow :
where {V1, V2, V3} defines the vectorial part of the transformation and T defines the translation part of the transformation. This transformation never change the nature of the objects.
Constructors(2)
Returns the identity transformation.
- constructor(theT: gp_Trsf2d): gp_Trsf
Creates a 3D transformation from the 2D transformation theT. The resulting transformation has a homogeneous vectorial part, V3, and a translation part, T3, built from theT: a11 a12 0 a13 V3 = a21 a22 0 T3 = a23 0 0 1. 0 It also has the same scale factor as theT.
This guarantees (by projection) that the transformation which would be performed by theT in a plane (2D space) is performed by the resulting transformation in the xOy plane of the 3D space, (i.e. in the plane defined by the origin (0., 0., 0.) and the vectors DX (1., 0., 0.), and DY (0., 1., 0.)). The scale factor is applied to the entire space.Parameters (1)theT
Instance methods(35)
Makes the transformation into a symmetrical transformation. theP is the center of the symmetry.
Parameters (1)theP
Makes the transformation into a symmetrical transformation. theA1 is the center of the axial symmetry.
Parameters (1)theA1
Makes the transformation into a symmetrical transformation. theA2 is the center of the planar symmetry and defines the plane of symmetry by its origin, "X Direction" and "Y Direction".
Parameters (1)theA2
- SetRotation(theA1: gp_Ax1, theAng: number): void
Changes the transformation into a rotation. theA1 is the rotation axis and theAng is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- SetRotation(theR: gp_Quaternion): void
Changes the transformation into a rotation defined by quaternion. Note that rotation is performed around origin, i.e. no translation is involved.
Parameters (1)theR
- SetRotationPart(theR: gp_Quaternion): void
Replaces the rotation part with specified quaternion.
Parameters (1)theR
Changes the transformation into a scale. theP is the center of the scale and theS is the scaling value. Raises ConstructionError If <theS> is null.
Parameters (2)thePtheS
- SetDisplacement(theFromSystem1: gp_Ax3, theToSystem2: gp_Ax3): void
Modifies this transformation so that it transforms the coordinate system defined by theFromSystem1 into the one defined by theToSystem2. After this modification, this transformation transforms:
- the origin of theFromSystem1 into the origin of theToSystem2,
- the "X Direction" of theFromSystem1 into the "X Direction" of theToSystem2,
- the "Y Direction" of theFromSystem1 into the "Y Direction" of theToSystem2, and
- the "main Direction" of theFromSystem1 into the "main Direction" of theToSystem2. Warning When you know the coordinates of a point in one coordinate system and you want to express these coordinates in another one, do not use the transformation resulting from this function. Use the transformation that results from SetTransformation instead. SetDisplacement and SetTransformation create related transformations: the vectorial part of one is the inverse of the vectorial part of the other.
Parameters (2)theFromSystem1theToSystem2
- SetTransformation(theToSystem: gp_Ax3): void
Modifies this transformation so that it transforms the coordinates of any point, (x, y, z), relative to a source coordinate system into the coordinates (x', y', z') which are relative to a target coordinate system, but which represent the same point The transformation is from the default coordinate system.
to the local coordinate system defined with the Ax3 theToSystem. Use in the same way as the previous method. FromSystem1 is defaulted to the absolute coordinate system.
Parameters (1)theToSystem
- SetTransformation(theFromSystem1: gp_Ax3, theToSystem2: gp_Ax3): void
Modifies this transformation so that it transforms the coordinates of any point, (x, y, z), relative to a source coordinate system into the coordinates (x', y', z') which are relative to a target coordinate system, but which represent the same point The transformation is from the coordinate system "theFromSystem1" to the coordinate system "theToSystem2". Example :
Parameters (2)theFromSystem1theToSystem2
- SetTransformation(R: gp_Quaternion, theT: gp_Vec): void
Sets transformation by directly specified rotation and translation.
Parameters (2)RtheT
- SetTranslation(theV: gp_Vec): void
Changes the transformation into a translation. theV is the vector of the translation.
Parameters (1)theV
- SetTranslation(theP1: gp_Pnt, theP2: gp_Pnt): void
Makes the transformation into a translation where the translation vector is the vector (theP1, theP2) defined from point theP1 to point theP2.
Parameters (2)theP1theP2
- SetTranslationPart(theV: gp_Vec): void
Replaces the translation vector with the vector theV.
Parameters (1)theV
- SetScaleFactor(theS: number): void
Modifies the scale factor. Raises ConstructionError If theS is null.
Parameters (1)theS
- SetForm(theP: gp_TrsfForm): voidParameters (1)
theP
- SetValues(a11: number, a12: number, a13: number, a14: number, a21: number, a22: number, a23: number, a24: number, a31: number, a32: number, a33: number, a34: number): void
Sets the coefficients of the transformation. The transformation of the point x,y,z is the point x',y',z' with :
The method Value(i,j) will return aij. Raises ConstructionError if the determinant of the aij is null. The matrix is orthogonalized before future using.
Parameters (12)a11a12a13a14a21a22a23a24a31a32a33a34
- IsNegative(): boolean
Returns true if the determinant of the vectorial part of this transformation is negative.
- Form(): gp_TrsfForm
Returns the nature of the transformation. It can be: an identity transformation, a rotation, a translation, a mirror transformation (relative to a point, an axis or a plane), a scaling transformation, or a compound transformation.
- ScaleFactor(): number
Returns the scale factor.
Returns the translation part of the transformation's matrix.
- GetRotation(theAxis: gp_XYZ, theAngle: number): { returnValue: boolean; theAngle: number }
Returns the boolean True if there is non-zero rotation. In the presence of rotation, the output parameters store the axis and the angle of rotation. The method always returns positive value "theAngle", i.e., 0. < theAngle <= PI. Note that this rotation is defined only by the vectorial part of the transformation; generally you would need to check also the translational part to obtain the axis (
gp_Ax1) of rotation.Parameters (2)theAxis—Mutated in place; read the updated value from this argument after the call.theAngle
ReturnsA result object with fields:
returnValue: the C++ return valuetheAngle: updated value from the call.
Returns quaternion representing rotational part of the transformation.
Returns the vectorial part of the transformation. It is a 3*3 matrix which includes the scale factor.
Computes the homogeneous vectorial part of the transformation. It is a 3*3 matrix which doesn't include the scale factor. In other words, the vectorial part of this transformation is equal to its homogeneous vectorial part, multiplied by the scale factor. The coefficients of this matrix must be multiplied by the scale factor to obtain the coefficients of the transformation.
- Value(theRow: number, theCol: number): number
Returns the coefficients of the transformation's matrix. It is a 3 rows * 4 columns matrix. This coefficient includes the scale factor. Raises OutOfRanged if theRow < 1 or theRow > 3 or theCol < 1 or theCol > 4.
Parameters (2)theRowtheCol
- Invert(): void
Computes the reverse transformation Raises an exception if the matrix of the transformation is not inversible, it means that the scale factor is lower or equal to Resolution from package gp. Computes the transformation composed with T and <me>. In a C++ implementation you can also write Tcomposed = <me> * T. Example :
- Multiplied(theT: gp_Trsf): gp_TrsfParameters (1)
theT
Computes the transformation composed with <me> and theT. <me> = <me> * theT.
Parameters (1)theT
- PreMultiply(theT: gp_Trsf): void
Computes the transformation composed with <me> and T. <me> = theT * <me>.
Parameters (1)theT
- Power(theN: number): voidParameters (1)
theN
Computes the following composition of transformations <me> * <me> * .......* <me>, theN time. if theN = 0 <me> = Identity if theN < 0 <me> = <me>.Inverse() ........... <me>.Inverse().
Raises if theN < 0 and if the matrix of the transformation not inversible.Parameters (1)theN
- Transforms(theX: number, theY: number, theZ: number): { theX: number; theY: number; theZ: number }Parameters (3)
theXtheYtheZ
- Transforms(theCoord: gp_XYZ): void
Transformation of a triplet XYZ with a Trsf.
Parameters (1)theCoord—Mutated in place; read the updated value from this argument after the call.
gp_Trsf2d
Defines a non-persistent transformation in 2D space. The following transformations are implemented :
- Translation, Rotation, Scale
- Symmetry with respect to a point and a line. Complex transformations can be obtained by combining the previous elementary transformations using the method Multiply. The transformations can be represented as follow : V1V2TXYXY |a11a12a13||
x||x'| |a21a22a23||y||y'| |001||1||1| where {V1, V2} defines the vectorial part of the transformation and T defines the translation part of the transformation. This transformation never change the nature of the objects.
Constructors(2)
Returns identity transformation.
- constructor(theT: gp_Trsf): gp_Trsf2d
Creates a 2d transformation in the XY plane from a 3d transformation .
Parameters (1)theT
Instance methods(28)
Changes the transformation into a symmetrical transformation. theP is the center of the symmetry.
Parameters (1)theP
Changes the transformation into a symmetrical transformation. theA is the center of the axial symmetry.
Parameters (1)theA
- SetRotation(theP: gp_Pnt2d, theAng: number): void
Changes the transformation into a rotation. theP is the rotation's center and theAng is the angular value of the rotation in radian.
Parameters (2)thePtheAng
Changes the transformation into a scale. theP is the center of the scale and theS is the scaling value.
Parameters (2)thePtheS
- SetTransformation(theFromSystem1: gp_Ax2d, theToSystem2: gp_Ax2d): void
Changes a transformation allowing passage from the coordinate system "theFromSystem1" to the coordinate system "theToSystem2".
Parameters (2)theFromSystem1theToSystem2
- SetTransformation(theToSystem: gp_Ax2d): void
Changes the transformation allowing passage from the basic coordinate system {P(0.,0.,0.), VX (1.,0.,0.), VY (0.,1.,0.)} to the local coordinate system defined with the Ax2d theToSystem.
Parameters (1)theToSystem
- SetTranslation(theV: gp_Vec2d): void
Changes the transformation into a translation. theV is the vector of the translation.
Parameters (1)theV
- SetTranslation(theP1: gp_Pnt2d, theP2: gp_Pnt2d): void
Makes the transformation into a translation from the point theP1 to the point theP2.
Parameters (2)theP1theP2
- SetTranslationPart(theV: gp_Vec2d): void
Replaces the translation vector with theV.
Parameters (1)theV
- SetScaleFactor(theS: number): void
Modifies the scale factor.
Parameters (1)theS
- IsNegative(): boolean
Returns true if the determinant of the vectorial part of this transformation is negative..
- Form(): gp_TrsfForm
Returns the nature of the transformation. It can be an identity transformation, a rotation, a translation, a mirror (relative to a point or an axis), a scaling transformation, or a compound transformation.
- ScaleFactor(): number
Returns the scale factor.
Returns the translation part of the transformation's matrix.
Returns the vectorial part of the transformation. It is a 2*2 matrix which includes the scale factor.
Returns the homogeneous vectorial part of the transformation. It is a 2*2 matrix which doesn't include the scale factor. The coefficients of this matrix must be multiplied by the scale factor to obtain the coefficients of the transformation.
- RotationPart(): number
Returns the angle corresponding to the rotational component of the transformation matrix (operation opposite to
SetRotation()). - Value(theRow: number, theCol: number): number
Returns the coefficients of the transformation's matrix. It is a 2 rows * 3 columns matrix. Raises OutOfRange if theRow < 1 or theRow > 2 or theCol < 1 or theCol > 3.
Parameters (2)theRowtheCol
- Invert(): void
Computes the reverse transformation. Raises an exception if the matrix of the transformation is not inversible, it means that the scale factor is lower or equal to Resolution from package gp.
- Multiplied(theT: gp_Trsf2d): gp_Trsf2dParameters (1)
theT
Computes the transformation composed from <me> and theT. <me> = <me> * theT.
Parameters (1)theT
- PreMultiply(theT: gp_Trsf2d): void
Computes the transformation composed from <me> and theT. <me> = theT * <me>.
Parameters (1)theT
- Power(theN: number): voidParameters (1)
theN
Computes the following composition of transformations <me> * <me> * .......* <me>, theN time. if theN = 0 <me> = Identity if theN < 0 <me> = <me>.Inverse() ........... <me>.Inverse().
Raises if theN < 0 and if the matrix of the transformation not inversible.Parameters (1)theN
- Transforms(theX: number, theY: number): { theX: number; theY: number }Parameters (2)
theXtheY
- Transforms(theCoord: gp_XY): void
Transforms a doublet XY with a Trsf2d.
Parameters (1)theCoord—Mutated in place; read the updated value from this argument after the call.
- SetValues(a11: number, a12: number, a13: number, a21: number, a22: number, a23: number): void
Sets the coefficients of the transformation. The transformation of the point x,y is the point x',y' with :
The method Value(i,j) will return aij. Raises ConstructionError if the determinant of the aij is null. If the matrix as not a uniform scale it will be orthogonalized before future using.
Parameters (6)a11a12a13a21a22a23
gp_TrsfForm
Properties(9)
gp_Vec
Defines a non-persistent vector in 3D space.
Constructors(5)
Creates a zero vector.
- constructor(theV: gp_Dir): gp_Vec
Creates a unitary vector from a direction theV.
Parameters (1)theV
- constructor(theCoord: gp_XYZ): gp_Vec
Creates a vector with a triplet of coordinates.
Parameters (1)theCoord
- constructor(theP1: gp_Pnt, theP2: gp_Pnt): gp_Vec
Creates a vector from two points. The length of the vector is the distance between theP1 and theP2.
Parameters (2)theP1theP2
- constructor(theXv: number, theYv: number, theZv: number): gp_Vec
Creates a point with its three cartesian coordinates.
Parameters (3)theXvtheYvtheZv
Instance methods(58)
- SetCoord(theIndex: number, theXi: number): void
Changes the coordinate of range theIndex theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raised if theIndex != {1, 2, 3}.
Parameters (2)theIndextheXi
- SetCoord(theXv: number, theYv: number, theZv: number): void
For this vector, assigns.
- the values theXv, theYv and theZv to its three coordinates.
Parameters (3)theXvtheYvtheZv
- SetX(theX: number): void
Assigns the given value to the X coordinate of this vector.
Parameters (1)theX
- SetY(theY: number): void
Assigns the given value to the X coordinate of this vector.
Parameters (1)theY
- SetZ(theZ: number): void
Assigns the given value to the X coordinate of this vector.
Parameters (1)theZ
Assigns the three coordinates of theCoord to this vector.
Parameters (1)theCoord
- Coord(theIndex: number): number
Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned Raised if theIndex != {1, 2, 3}.
Parameters (1)theIndex
- Coord(theXv: number, theYv: number, theZv: number): { theXv: number; theYv: number; theZv: number }
For this vector returns its three coordinates theXv, theYv, and theZv inline.
Parameters (3)theXvtheYvtheZv
ReturnsA result object with fields:
theXv: updated value from the call.theYv: updated value from the call.theZv: updated value from the call.
- X(): number
For this vector, returns its X coordinate.
- Y(): number
For this vector, returns its Y coordinate.
- Z(): number
For this vector, returns its Z coordinate.
For this vector, returns.
- its three coordinates as a number triple
Returns True if the two vectors have the same magnitude value and the same direction. The precision values are theLinearTolerance for the magnitude and theAngularTolerance for the direction.
Parameters (3)theOthertheLinearTolerancetheAngularTolerance
Returns True if abs(<me>.Angle(theOther) - PI/2.) <= theAngularTolerance Raises VectorWithNullMagnitude if <me>.
Magnitude()<= Resolution or theOther.Magnitude() <= Resolution from gp.Parameters (2)theOthertheAngularTolerance
- IsOpposite(theOther: gp_Vec, theAngularTolerance: number): boolean
Returns True if PI - <me>.Angle(theOther) <= theAngularTolerance Raises VectorWithNullMagnitude if <me>.
Magnitude()<= Resolution or Other.Magnitude() <= Resolution from gp.Parameters (2)theOthertheAngularTolerance
- IsParallel(theOther: gp_Vec, theAngularTolerance: number): boolean
Returns True if Angle(<me>, theOther) <= theAngularTolerance or PI - Angle(<me>, theOther) <= theAngularTolerance This definition means that two parallel vectors cannot define a plane but two vectors with opposite directions are considered as parallel. Raises VectorWithNullMagnitude if <me>.
Magnitude()<= Resolution or Other.Magnitude() <= Resolution from gp.Parameters (2)theOthertheAngularTolerance
Computes the angular value between <me> and <theOther> Returns the angle value between 0 and PI in radian. Raises VectorWithNullMagnitude if <me>.
Magnitude()<= Resolution from gp or theOther.Magnitude() <= Resolution because the angular value is indefinite if one of the vectors has a null magnitude.Parameters (1)theOther
- AngleWithRef(theOther: gp_Vec, theVRef: gp_Vec): number
Computes the angle, in radians, between this vector and vector theOther. The result is a value between -Pi and Pi.
For this, theVRef defines the positive sense of rotation: the angular value is positive, if the cross product this ^ theOther has the same orientation as theVRef relative to the plane defined by the vectors this and theOther. Otherwise, the angular value is negative.
Exceptions gp_VectorWithNullMagnitude if the magnitude of this vector, the vector theOther, or the vector theVRef is less than or equal togp::Resolution().
Standard_DomainError if this vector, the vector theOther, and the vector theVRef are coplanar, unless this vector and the vector theOther are parallel.Parameters (2)theOthertheVRef
- Magnitude(): number
Computes the magnitude of this vector.
- SquareMagnitude(): number
Computes the square magnitude of this vector.
Adds two vectors.
Parameters (1)theOther
Adds two vectors.
Parameters (1)theOther
Subtracts two vectors.
Parameters (1)theRight
- Subtracted(theRight: gp_Vec): gp_Vec
Subtracts two vectors.
Parameters (1)theRight
- Multiply(theScalar: number): void
Multiplies a vector by a scalar.
Parameters (1)theScalar
- Multiplied(theScalar: number): gp_Vec
Multiplies a vector by a scalar.
Parameters (1)theScalar
- Divide(theScalar: number): void
Divides a vector by a scalar.
Parameters (1)theScalar
Divides a vector by a scalar.
Parameters (1)theScalar
computes the cross product between two vectors
Parameters (1)theRight
computes the cross product between two vectors
Parameters (1)theRight
- CrossMagnitude(theRight: gp_Vec): number
Computes the magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||.
Parameters (1)theRight
- CrossSquareMagnitude(theRight: gp_Vec): number
Computes the square magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||**2.
Parameters (1)theRight
- CrossCross(theV1: gp_Vec, theV2: gp_Vec): void
Computes the triple vector product. <me> ^= (theV1 ^ theV2).
Parameters (2)theV1theV2
- CrossCrossed(theV1: gp_Vec, theV2: gp_Vec): gp_Vec
Computes the triple vector product. <me> ^ (theV1 ^ theV2).
Parameters (2)theV1theV2
computes the scalar product
Parameters (1)theOther
Computes the triple scalar product <me> * (theV1 ^ theV2).
Parameters (2)theV1theV2
- Normalize(): void
normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from gp.
- Normalized(): gp_Vec
normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from gp.
- Reverse(): void
Reverses the direction of a vector.
Reverses the direction of a vector.
- SetLinearForm(theA1: number, theV1: gp_Vec, theA2: number, theV2: gp_Vec, theA3: number, theV3: gp_Vec, theV4: gp_Vec): void
<me> is set to the following linear form : theA1 * theV1 + theA2 * theV2 + theA3 * theV3 + theV4
Parameters (7)theA1theV1theA2theV2theA3theV3theV4
- SetLinearForm(theA1: number, theV1: gp_Vec, theA2: number, theV2: gp_Vec, theA3: number, theV3: gp_Vec): void
<me> is set to the following linear form : theA1 * theV1 + theA2 * theV2 + theA3 * theV3
Parameters (6)theA1theV1theA2theV2theA3theV3
- SetLinearForm(theA1: number, theV1: gp_Vec, theA2: number, theV2: gp_Vec, theV3: gp_Vec): void
<me> is set to the following linear form : theA1 * theV1 + theA2 * theV2 + theV3
Parameters (5)theA1theV1theA2theV2theV3
- SetLinearForm(theA1: number, theV1: gp_Vec, theA2: number, theV2: gp_Vec): void
<me> is set to the following linear form : theA1 * theV1 + theA2 * theV2
Parameters (4)theA1theV1theA2theV2
- SetLinearForm(theA1: number, theV1: gp_Vec, theV2: gp_Vec): void
<me> is set to the following linear form : theA1 * theV1 + theV2
Parameters (3)theA1theV1theV2
- SetLinearForm(theV1: gp_Vec, theV2: gp_Vec): void
<me> is set to the following linear form : theV1 + theV2
Parameters (2)theV1theV2
- Parameters (1)
theV
- Parameters (1)
theA1
- Parameters (1)
theA2
Performs the symmetrical transformation of a vector with respect to the vector theV which is the center of the symmetry.
Parameters (1)theV
Performs the symmetrical transformation of a vector with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
Performs the symmetrical transformation of a vector with respect to a plane. The axis placement theA2 locates the plane of the symmetry : (Location, XDirection, YDirection).
Parameters (1)theA2
- Parameters (2)
theA1theAng
Rotates a vector. theA1 is the axis of the rotation. theAng is the angular value of the rotation in radians.
Parameters (2)theA1theAng
- Scale(theS: number): voidParameters (1)
theS
Scales a vector. theS is the scaling value.
Parameters (1)theS
Transforms a vector with the transformation theT.
Parameters (1)theT
- Transformed(theT: gp_Trsf): gp_Vec
Transforms a vector with the transformation theT.
Parameters (1)theT
gp_Vec2d
Defines a non-persistent vector in 2D space.
Constructors(5)
Creates a zero vector.
- constructor(theV: gp_Dir2d): gp_Vec2d
Creates a unitary vector from a direction theV.
Parameters (1)theV
- constructor(theCoord: gp_XY): gp_Vec2d
Creates a vector with a doublet of coordinates.
Parameters (1)theCoord
- constructor(theXv: number, theYv: number): gp_Vec2d
Creates a point with its two Cartesian coordinates.
Parameters (2)theXvtheYv
- constructor(theP1: gp_Pnt2d, theP2: gp_Pnt2d): gp_Vec2d
Creates a vector from two points. The length of the vector is the distance between theP1 and theP2.
Parameters (2)theP1theP2
Instance methods(48)
- SetCoord(theIndex: number, theXi: number): void
Changes the coordinate of range theIndex theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}.
Parameters (2)theIndextheXi
- SetCoord(theXv: number, theYv: number): void
For this vector, assigns the values theXv and theYv to its two coordinates.
Parameters (2)theXvtheYv
- SetX(theX: number): void
Assigns the given value to the X coordinate of this vector.
Parameters (1)theX
- SetY(theY: number): void
Assigns the given value to the Y coordinate of this vector.
Parameters (1)theY
Assigns the two coordinates of theCoord to this vector.
Parameters (1)theCoord
- Coord(theIndex: number): number
Returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raised if theIndex != {1, 2}.
Parameters (1)theIndex
- Coord(theXv: number, theYv: number): { theXv: number; theYv: number }
For this vector, returns its two coordinates theXv and theYv.
Parameters (2)theXvtheYv
ReturnsA result object with fields:
theXv: updated value from the call.theYv: updated value from the call.
- X(): number
For this vector, returns its X coordinate.
- Y(): number
For this vector, returns its Y coordinate.
For this vector, returns its two coordinates as a number pair.
Returns True if the two vectors have the same magnitude value and the same direction. The precision values are theLinearTolerance for the magnitude and theAngularTolerance for the direction.
Parameters (3)theOthertheLinearTolerancetheAngularTolerance
Returns True if abs(std::abs(<me>.Angle(theOther)) - PI/2.) <= theAngularTolerance Raises VectorWithNullMagnitude if <me>.
Magnitude()<= Resolution or theOther.Magnitude() <= Resolution from gp.Parameters (2)theOthertheAngularTolerance
- IsOpposite(theOther: gp_Vec2d, theAngularTolerance: number): boolean
Returns True if PI - std::abs(<me>.Angle(theOther)) <= theAngularTolerance Raises VectorWithNullMagnitude if <me>.
Magnitude()<= Resolution or theOther.Magnitude() <= Resolution from gp.Parameters (2)theOthertheAngularTolerance
- IsParallel(theOther: gp_Vec2d, theAngularTolerance: number): boolean
Returns true if std::abs(Angle(<me>, theOther)) <= theAngularTolerance or PI - std::abs(Angle(<me>, theOther)) <= theAngularTolerance Two vectors with opposite directions are considered as parallel. Raises VectorWithNullMagnitude if <me>.
Magnitude()<= Resolution or theOther.Magnitude() <= Resolution from gp.Parameters (2)theOthertheAngularTolerance
Computes the angular value between <me> and <theOther> returns the angle value between -PI and PI in radian. The orientation is from <me> to theOther. The positive sense is the trigonometric sense. Raises VectorWithNullMagnitude if <me>.
Magnitude()<= Resolution from gp or theOther.Magnitude() <= Resolution because the angular value is indefinite if one of the vectors has a null magnitude.Parameters (1)theOther
- Magnitude(): number
Computes the magnitude of this vector.
- SquareMagnitude(): number
Computes the square magnitude of this vector.
- Parameters (1)
theOther
Adds two vectors.
Parameters (1)theOther
Computes the crossing product between two vectors.
Parameters (1)theRight
- CrossMagnitude(theRight: gp_Vec2d): number
Computes the magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||.
Parameters (1)theRight
- CrossSquareMagnitude(theRight: gp_Vec2d): number
Computes the square magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||**2.
Parameters (1)theRight
- Divide(theScalar: number): voidParameters (1)
theScalar
divides a vector by a scalar
Parameters (1)theScalar
Computes the scalar product.
Parameters (1)theOther
- Multiply(theScalar: number): voidParameters (1)
theScalar
- Multiplied(theScalar: number): gp_Vec2d
Normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from package gp.
Parameters (1)theScalar
- Normalize(): void
Normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from package gp. Reverses the direction of a vector.
- Reverse(): void
Reverses the direction of a vector.
Subtracts two vectors.
Parameters (1)theRight
- Subtracted(theRight: gp_Vec2d): gp_Vec2d
Subtracts two vectors.
Parameters (1)theRight
- SetLinearForm(theA1: number, theV1: gp_Vec2d, theA2: number, theV2: gp_Vec2d, theV3: gp_Vec2d): void
<me> is set to the following linear form : theA1 * theV1 + theA2 * theV2 + theV3
Parameters (5)theA1theV1theA2theV2theV3
- SetLinearForm(theA1: number, theV1: gp_Vec2d, theA2: number, theV2: gp_Vec2d): void
<me> is set to the following linear form : theA1 * theV1 + theA2 * theV2
Parameters (4)theA1theV1theA2theV2
- SetLinearForm(theA1: number, theV1: gp_Vec2d, theV2: gp_Vec2d): void
<me> is set to the following linear form : theA1 * theV1 + theV2
Parameters (3)theA1theV1theV2
- SetLinearForm(theV1: gp_Vec2d, theV2: gp_Vec2d): void
<me> is set to the following linear form : theV1 + theV2
Parameters (2)theV1theV2
Performs the symmetrical transformation of a vector with respect to the vector theV which is the center of the symmetry.
Parameters (1)theV
Performs the symmetrical transformation of a vector with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
Performs the symmetrical transformation of a vector with respect to the vector theV which is the center of the symmetry.
Parameters (1)theV
Performs the symmetrical transformation of a vector with respect to an axis placement which is the axis of the symmetry.
Parameters (1)theA1
- Rotate(theAng: number): voidParameters (1)
theAng
Rotates a vector. theAng is the angular value of the rotation in radians.
Parameters (1)theAng
- Scale(theS: number): voidParameters (1)
theS
Scales a vector. theS is the scaling value.
Parameters (1)theS
- Parameters (1)
theT
- Transformed(theT: gp_Trsf2d): gp_Vec2d
Transforms a vector with a Trsf from gp.
Parameters (1)theT
gp_XY
This class describes a cartesian coordinate entity in 2D space {X,Y}. This class is non persistent. This entity used for algebraic calculation. An XY can be transformed with a Trsf2d or a GTrsf2d from package gp. It is used in vectorial computations or for holding this type of information in data structures.
Constructors(2)
- constructor(): gp_XY
Creates XY object with zero coordinates (0,0).
- constructor(theX: number, theY: number): gp_XY
a number pair defined by the XY coordinates
Parameters (2)theXtheY
Instance methods(36)
- SetCoord(theIndex: number, theXi: number): void
modifies the coordinate of range theIndex theIndex = 1 => X is modified theIndex = 2 => Y is modified Raises OutOfRange if theIndex != {1, 2}.
Parameters (2)theIndextheXi
- SetCoord(theX: number, theY: number): void
For this number pair, assigns the values theX and theY to its coordinates.
Parameters (2)theXtheY
- SetX(theX: number): void
Assigns the given value to the X coordinate of this number pair.
Parameters (1)theX
- SetY(theY: number): void
Assigns the given value to the Y coordinate of this number pair.
Parameters (1)theY
- Coord(theIndex: number): number
returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned Raises OutOfRange if theIndex != {1, 2}.
Parameters (1)theIndex
- Coord(theX: number, theY: number): { theX: number; theY: number }
For this number pair, returns its coordinates X and Y.
Parameters (2)theXtheY
ReturnsA result object with fields:
theX: updated value from the call.theY: updated value from the call.
- ChangeCoord(theIndex: number): numberParameters (1)
theIndex
- X(): number
Returns the X coordinate of this number pair.
- Y(): number
Returns the Y coordinate of this number pair.
- Modulus(): number
Computes std::sqrt(XX + YY) where X and Y are the two coordinates of this number pair.
- SquareModulus(): number
Computes XX + YY where X and Y are the two coordinates of this number pair.
Returns true if the coordinates of this number pair are equal to the respective coordinates of the number pair theOther, within the specified tolerance theTolerance.
Parameters (2)theOthertheTolerance
Computes the sum of this number pair and number pair theOther.
Parameters (1)theOther
Computes the sum of this number pair and number pair theOther.
Parameters (1)theOther
- Parameters (1)
theOther
- CrossMagnitude(theRight: gp_XY): number
computes the magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||
Parameters (1)theRight
- CrossSquareMagnitude(theRight: gp_XY): number
computes the square magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||**2
Parameters (1)theRight
- Divide(theScalar: number): void
divides <me> by a real.
Parameters (1)theScalar
Divides <me> by a real.
Parameters (1)theScalar
Computes the scalar product between <me> and theOther.
Parameters (1)theOther
- Multiply(theScalar: number): voidParameters (1)
theScalar
- Parameters (1)
theOther
<me> = theMatrix * <me>
Parameters (1)theMatrix
- Multiplied(theScalar: number): gp_XYParameters (1)
theScalar
- Multiplied(theOther: gp_XY): gp_XYParameters (1)
theOther
- Multiplied(theMatrix: gp_Mat2d): gp_XY
New = theMatrix * <me>.
Parameters (1)theMatrix
- Normalize(): void
Raises ConstructionError if <me>.
Modulus()<= Resolution from gp - Normalized(): gp_XY
Raises ConstructionError if <me>.
Modulus()<= Resolution from gp - Reverse(): void
- SetLinearForm(theA1: number, theXY1: gp_XY, theA2: number, theXY2: gp_XY): void
Computes the following linear combination and assigns the result to this number pair:
Parameters (4)theA1theXY1theA2theXY2
- SetLinearForm(theA1: number, theXY1: gp_XY, theA2: number, theXY2: gp_XY, theXY3: gp_XY): void
Computes the following linear combination and assigns the result to this number pair:
Parameters (5)theA1theXY1theA2theXY2theXY3
- SetLinearForm(theA1: number, theXY1: gp_XY, theXY2: gp_XY): void
Computes the following linear combination and assigns the result to this number pair:
Parameters (3)theA1theXY1theXY2
- SetLinearForm(theXY1: gp_XY, theXY2: gp_XY): void
Computes the following linear combination and assigns the result to this number pair:
Parameters (2)theXY1theXY2
- Parameters (1)
theOther
- Subtracted(theOther: gp_XY): gp_XYParameters (1)
theOther
gp_XYZ
This class describes a cartesian coordinate entity in 3D space {X,Y,Z}. This entity is used for algebraic calculation. This entity can be transformed with a "Trsf" or a "GTrsf" from package "gp". It is used in vectorial computations or for holding this type of information in data structures.
Constructors(2)
Creates an XYZ object with zero coordinates (0,0,0).
- constructor(theX: number, theY: number, theZ: number): gp_XYZ
creates an XYZ with given coordinates
Parameters (3)theXtheYtheZ
Instance methods(46)
- SetCoord(theX: number, theY: number, theZ: number): void
For this XYZ object, assigns the values theX, theY and theZ to its three coordinates.
Parameters (3)theXtheYtheZ
- SetCoord(theIndex: number, theXi: number): void
modifies the coordinate of range theIndex theIndex = 1 => X is modified theIndex = 2 => Y is modified theIndex = 3 => Z is modified Raises OutOfRange if theIndex != {1, 2, 3}.
Parameters (2)theIndextheXi
- SetX(theX: number): void
Assigns the given value to the X coordinate.
Parameters (1)theX
- SetY(theY: number): void
Assigns the given value to the Y coordinate.
Parameters (1)theY
- SetZ(theZ: number): void
Assigns the given value to the Z coordinate.
Parameters (1)theZ
- Coord(theIndex: number): number
returns the coordinate of range theIndex : theIndex = 1 => X is returned theIndex = 2 => Y is returned theIndex = 3 => Z is returned
Raises OutOfRange if theIndex != {1, 2, 3}.Parameters (1)theIndex
- Coord(theX: number, theY: number, theZ: number): { theX: number; theY: number; theZ: number }Parameters (3)
theXtheYtheZ
- ChangeCoord(theIndex: number): numberParameters (1)
theIndex
- GetData(): number
Returns a const ptr to coordinates location. Is useful for algorithms, but DOES NOT PERFORM ANY CHECKS!
- ChangeData(): number
Returns a ptr to coordinates location. Is useful for algorithms, but DOES NOT PERFORM ANY CHECKS!
- X(): number
Returns the X coordinate.
- Y(): number
Returns the Y coordinate.
- Z(): number
Returns the Z coordinate.
- Modulus(): number
Computes std::sqrt(XX + YY + Z*Z) where X, Y and Z are the three coordinates of this XYZ object.
- SquareModulus(): number
Computes XX + YY + Z*Z where X, Y and Z are the three coordinates of this XYZ object.
Returns True if he coordinates of this XYZ object are equal to the respective coordinates Other, within the specified tolerance theTolerance.
Parameters (2)theOthertheTolerance
- Parameters (1)
theOther
- Parameters (1)
theOther
- Parameters (1)
theOther
- Parameters (1)
theOther
- CrossMagnitude(theRight: gp_XYZ): number
Computes the magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||.
Parameters (1)theRight
- CrossSquareMagnitude(theRight: gp_XYZ): number
Computes the square magnitude of the cross product between <me> and theRight. Returns || <me> ^ theRight ||**2.
Parameters (1)theRight
- CrossCross(theCoord1: gp_XYZ, theCoord2: gp_XYZ): void
Triple vector product Computes <me> = <me>.Cross(theCoord1.Cross(theCoord2)).
Parameters (2)theCoord1theCoord2
- CrossCrossed(theCoord1: gp_XYZ, theCoord2: gp_XYZ): gp_XYZ
Triple vector product computes New = <me>.Cross(theCoord1.Cross(theCoord2)).
Parameters (2)theCoord1theCoord2
- Divide(theScalar: number): void
divides <me> by a real.
Parameters (1)theScalar
divides <me> by a real.
Parameters (1)theScalar
Computes the scalar product between <me> and theOther.
Parameters (1)theOther
Computes the triple scalar product.
Parameters (2)theCoord1theCoord2
- Multiply(theScalar: number): voidParameters (1)
theScalar
- Parameters (1)
theOther
<me> = theMatrix * <me>
Parameters (1)theMatrix
- Multiplied(theScalar: number): gp_XYZParameters (1)
theScalar
- Multiplied(theOther: gp_XYZ): gp_XYZParameters (1)
theOther
- Multiplied(theMatrix: gp_Mat): gp_XYZ
New = theMatrix * <me>.
Parameters (1)theMatrix
- Normalize(): void
Raised if <me>.
Modulus()<= Resolution from gp - Normalized(): gp_XYZ
Raised if <me>.
Modulus()<= Resolution from gp - Reverse(): void
- Parameters (1)
theOther
- Subtracted(theOther: gp_XYZ): gp_XYZParameters (1)
theOther
- SetLinearForm(theA1: number, theXYZ1: gp_XYZ, theA2: number, theXYZ2: gp_XYZ, theA3: number, theXYZ3: gp_XYZ, theXYZ4: gp_XYZ): void
<me> is set to the following linear form :
Parameters (7)theA1theXYZ1theA2theXYZ2theA3theXYZ3theXYZ4
- SetLinearForm(theA1: number, theXYZ1: gp_XYZ, theA2: number, theXYZ2: gp_XYZ, theA3: number, theXYZ3: gp_XYZ): void
<me> is set to the following linear form :
Parameters (6)theA1theXYZ1theA2theXYZ2theA3theXYZ3
- SetLinearForm(theA1: number, theXYZ1: gp_XYZ, theA2: number, theXYZ2: gp_XYZ, theXYZ3: gp_XYZ): void
<me> is set to the following linear form :
Parameters (5)theA1theXYZ1theA2theXYZ2theXYZ3
- SetLinearForm(theA1: number, theXYZ1: gp_XYZ, theA2: number, theXYZ2: gp_XYZ): void
<me> is set to the following linear form :
Parameters (4)theA1theXYZ1theA2theXYZ2
- SetLinearForm(theA1: number, theXYZ1: gp_XYZ, theXYZ2: gp_XYZ): void
<me> is set to the following linear form :
Parameters (3)theA1theXYZ1theXYZ2
- SetLinearForm(theXYZ1: gp_XYZ, theXYZ2: gp_XYZ): void
<me> is set to the following linear form :
Parameters (2)theXYZ1theXYZ2