OCC.gp module¶

class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object

advance
()¶

copy
()¶

decr
()¶

distance
()¶

equal
()¶

incr
()¶

next
()¶

previous
()¶

thisown
¶ The membership flag

value
()¶


class
gp
¶ Bases:
object

static
OX
(*args)¶  Identifies an axis where its origin is Origin and its unit vector coordinates X = 1.0, Y = Z = 0.0
Return type: gp_Ax1

static
OX2d
(*args)¶  Identifies an axis where its origin is Origin2d and its unit vector coordinates are: X = 1.0, Y = 0.0
Return type: gp_Ax2d

static
OY
(*args)¶  Identifies an axis where its origin is Origin and its unit vector coordinates Y = 1.0, X = Z = 0.0
Return type: gp_Ax1

static
OY2d
(*args)¶  Identifies an axis where its origin is Origin2d and its unit vector coordinates are Y = 1.0, X = 0.0
Return type: gp_Ax2d

static
OZ
(*args)¶  Identifies an axis where its origin is Origin and its unit vector coordinates Z = 1.0, Y = X = 0.0
Return type: gp_Ax1

static
Origin
(*args)¶  Identifies a Cartesian point with coordinates X = Y = Z = 0.0.0
Return type: gp_Pnt

static
Origin2d
(*args)¶  Identifies a Cartesian point with coordinates X = Y = 0.0
Return type: gp_Pnt2d

static
Resolution
(*args)¶  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 as gp::Resolution().
Return type: float

static
XOY
(*args)¶  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
Return type: gp_Ax2

static
YOZ
(*args)¶  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
Return type: gp_Ax2

static
ZOX
(*args)¶  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
Return type: gp_Ax2

thisown
¶ The membership flag

static

class
gp_Ax1
(*args)¶ Bases:
object
 Creates an axis object representing Z axis of the reference coordinate system.
Return type: None  P is the location point and V is the direction of <self>.
Parameters: Return type: 
Angle
()¶  Computes the angular value, in radians, between <self>.Direction() and <Other>.Direction(). Returns the angle between 0 and 2*PI radians.
Parameters: Other (gp_Ax1) – Return type: float

IsCoaxial
()¶  Returns True if : . the angle between <self> and <Other> is lower or equal to <AngularTolerance> and . the distance between <self>.Location() and <Other> is lower or equal to <LinearTolerance> and . the distance between <Other>.Location() and <self> is lower or equal to LinearTolerance.
Parameters: Return type:

IsNormal
()¶  Returns True if the direction of the <self> and <Other> 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 AngularTolerance..
Parameters: Return type:

IsOpposite
()¶  Returns True if the direction of <self> and <Other> 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 AngularTolerance.
Parameters: Return type:

IsParallel
()¶  Returns True if the direction of <self> and <Other> 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 AngularTolerance.
Parameters: Return type:

Mirror
()¶  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: P (gp_Pnt) – Return type: None  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: A1 (gp_Ax1) – Return type: None  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: A2 (gp_Ax2) – Return type: None

Mirrored
()¶  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: P (gp_Pnt) – Return type: gp_Ax1  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: A1 (gp_Ax1) – Return type: gp_Ax1  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: A2 (gp_Ax2) – Return type: gp_Ax1

Reverse
()¶  Reverses the unit vector of this axis. and assigns the result to this axis.
Return type: None

Rotate
()¶  Rotates this axis at an angle Ang (in radians) about the axis A1 and assigns the result to this axis.
Parameters: Return type:

Rotated
()¶  Rotates this axis at an angle Ang (in radians) about the axis A1 and creates a new one.
Parameters: Return type:

Scale
()¶  Applies a scaling transformation to this axis with:  scale factor S, and  center P and assigns the result to this axis.
Parameters: Return type:

Scaled
()¶  Applies a scaling transformation to this axis with:  scale factor S, and  center P and creates a new axis.
Parameters: Return type:

Transform
()¶  Applies the transformation T to this axis. and assigns the result to this axis.
Parameters: T (gp_Trsf) – Return type: None

Transformed
()¶  Applies the transformation T 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: T (gp_Trsf) – Return type: gp_Ax1

Translate
()¶  Translates this axis by the vector V, and assigns the result to this axis.
Parameters: V (gp_Vec) – Return type: None  Translates this axis by: the vector (P1, P2) defined from point P1 to point P2. and assigns the result to this axis.
Parameters: Return type:

Translated
()¶  Translates this axis by the vector V, and creates a new one.
Parameters: V (gp_Vec) – Return type: gp_Ax1  Translates this axis by: the vector (P1, P2) defined from point P1 to point P2. and creates a new one.
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Ax2
(*args)¶ Bases:
object
 Creates an object corresponding to the reference coordinate system (OXYZ).
Return type: None  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: Return type:  Creates  a coordinate system with an origin P, where V gives the ‘main Direction’ (here, ‘X Direction’ and ‘Y Direction’ are defined automatically).
Parameters: Return type: 
Angle
()¶  Computes the angular value, in radians, between the main direction of <self> and the main direction of <Other>. Returns the angle between 0 and PI in radians.
Parameters: Other (gp_Ax2) – Return type: float

Axis
()¶  Returns the main axis of <self>. It is the ‘Location’ point and the main ‘Direction’.
Return type: gp_Ax1

IsCoplanar
()¶ Parameters: Return type:  Returns True if . the distance between <self> and the ‘Location’ point of A1 is lower of equal to LinearTolerance and . the main direction of <self> and the direction of A1 are normal. Note: the tolerance criterion for angular equality is given by AngularTolerance.
Parameters: Return type:

Mirror
()¶  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 righthanded property of the coordinate system.
Parameters: P (gp_Pnt) – Return type: None  Performs a symmetrical transformation of this coordinate system with respect to:  the axis A1, and assigns the result to this coordinate systeme. 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 righthanded property of the coordinate system.
Parameters: A1 (gp_Ax1) – Return type: None  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 systeme. 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 righthanded property of the coordinate system.
Parameters: A2 (gp_Ax2) – Return type: None

Mirrored
()¶  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 righthanded property of the coordinate system.
Parameters: P (gp_Pnt) – Return type: gp_Ax2  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 righthanded property of the coordinate system.
Parameters: A1 (gp_Ax1) – Return type: gp_Ax2  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 righthanded property of the coordinate system.
Parameters: A2 (gp_Ax2) – Return type: gp_Ax2

Rotated
()¶  Rotates an axis placement. <A1> is the axis of the rotation . Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Applies a scaling transformation on the axis placement. The ‘Location’ point of the axisplacement is modified. Warnings : If the scale <S> 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: Return type:

SetAxis
()¶  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: A1 (gp_Ax1) – Return type: None

SetDirection
()¶  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: V (gp_Dir) – Return type: None

SetLocation
()¶  Changes the ‘Location’ point (origin) of <self>.
Parameters: P (gp_Pnt) – Return type: None

SetXDirection
()¶  Changes the ‘Xdirection’ of <self>. 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: Vx (gp_Dir) – Return type: None

SetYDirection
()¶  Changes the ‘Ydirection’ of <self>. 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: Vy (gp_Dir) – Return type: None

Transformed
()¶  Transforms an axis placement with a Trsf. The ‘Location’ point, the ‘XDirection’ and the ‘YDirection’ are transformed with T. The resulting main ‘Direction’ of <self> is the cross product between the ‘XDirection’ and the ‘YDirection’ after transformation.
Parameters: T (gp_Trsf) – Return type: gp_Ax2

Translated
()¶  Translates an axis plaxement in the direction of the vector <V>. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec) – Return type: gp_Ax2  Translates an axis placement from the point <P1> to the point <P2>.
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Ax22d
(*args)¶ Bases:
object
 Creates an object representing the reference coordinate system (OXY).
Return type: None  Creates a coordinate system with origin P and where:  Vx is the ‘X Direction’, and  the ‘Y Direction’ is orthogonal to Vx and oriented so that the cross products Vx^’Y Direction’ and Vx^Vy have the same sign. Raises ConstructionError if Vx and Vy are parallel (same or opposite orientation).
Parameters: Return type:  Creates  a coordinate system with origin P and ‘X Direction’ V, which is:  righthanded if Sense is true (default value), or  lefthanded if Sense is false
Parameters: Return type:  Creates  a coordinate system where its origin is the origin of A and its ‘X Direction’ is the unit vector of A, which is:  righthanded if Sense is true (default value), or  lefthanded if Sense is false.
Parameters: Return type: 
Mirrored
()¶  Performs the symmetrical transformation of an axis placement with respect to the point P 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: P (gp_Pnt2d) – Return type: gp_Ax22d  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: A (gp_Ax2d) – Return type: gp_Ax22d

Rotated
()¶  Rotates an axis placement. <A1> is the axis of the rotation . Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Applies a scaling transformation on the axis placement. The ‘Location’ point of the axisplacement is modified. Warnings : If the scale <S> 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: Return type:

SetAxis
()¶  Assigns the origin and the two unit vectors of the coordinate system A1 to this coordinate system.
Parameters: A1 (gp_Ax22d) – Return type: None

SetLocation
()¶  Changes the ‘Location’ point (origin) of <self>.
Parameters: P (gp_Pnt2d) – Return type: None

SetXAxis
()¶  Changes the XAxis and YAxis (‘Location’ point and ‘Direction’) of <self>. The ‘YDirection’ is recomputed in the same sense as before.
Parameters: A1 (gp_Ax2d) – Return type: None

SetXDirection
()¶  Assigns Vx to the ‘X Direction’ of this coordinate system. The other unit vector of this coordinate system is recomputed, normal to Vx , without modifying the orientation (righthanded or lefthanded) of this coordinate system.
Parameters: Vx (gp_Dir2d) – Return type: None

SetYAxis
()¶  Changes the XAxis and YAxis (‘Location’ point and ‘Direction’) of <self>. The ‘XDirection’ is recomputed in the same sense as before.
Parameters: A1 (gp_Ax2d) – Return type: None

SetYDirection
()¶  Assignsr Vy to the ‘Y Direction’ of this coordinate system. The other unit vector of this coordinate system is recomputed, normal to Vy, without modifying the orientation (righthanded or lefthanded) of this coordinate system.
Parameters: Vy (gp_Dir2d) – Return type: None

Transformed
()¶  Transforms an axis placement with a Trsf. The ‘Location’ point, the ‘XDirection’ and the ‘YDirection’ are transformed with T. The resulting main ‘Direction’ of <self> is the cross product between the ‘XDirection’ and the ‘YDirection’ after transformation.
Parameters: T (gp_Trsf2d) – Return type: gp_Ax22d

Translate
()¶ Parameters: Return type: Return type:

Translated
()¶  Translates an axis plaxement in the direction of the vector <V>. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec2d) – Return type: gp_Ax22d  Translates an axis placement from the point <P1> to the point <P2>.
Parameters: Return type:

XAxis
()¶  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.
Return type: gp_Ax2d

YAxis
()¶  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.
Return type: gp_Ax2d

thisown
¶ The membership flag

class
gp_Ax2d
(*args)¶ Bases:
object
 Creates an axis object representing X axis of the reference coordinate system.
Return type: None  Creates an Ax2d. <P> is the ‘Location’ point of the axis placement and V is the ‘Direction’ of the axis placement.
Parameters: Return type: 
Angle
()¶  Computes the angle, in radians, between this axis and the axis Other. The value of the angle is between Pi and Pi.
Parameters: Other (gp_Ax2d) – Return type: float

IsCoaxial
()¶  Returns True if : . the angle between <self> and <Other> is lower or equal to <AngularTolerance> and . the distance between <self>.Location() and <Other> is lower or equal to <LinearTolerance> and . the distance between <Other>.Location() and <self> is lower or equal to LinearTolerance.
Parameters: Return type:

IsNormal
()¶  Returns true if this axis and the axis Other 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 AngularTolerance.
Parameters: Return type:

IsOpposite
()¶  Returns true if this axis and the axis Other 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 AngularTolerance.
Parameters: Return type:

IsParallel
()¶  Returns true if this axis and the axis Other 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 AngularTolerance.
Parameters: Return type:

Mirrored
()¶  Performs the symmetrical transformation of an axis placement with respect to the point P which is the center of the symmetry.
Parameters: P (gp_Pnt2d) – Return type: gp_Ax2d  Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry.
Parameters: A (gp_Ax2d) – Return type: gp_Ax2d

Reversed
()¶  Computes a new axis placement with a direction opposite to the direction of <self>.
Return type: gp_Ax2d

Rotated
()¶  Rotates an axis placement. <P> is the center of the rotation . Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  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: Return type:

SetLocation
()¶  Changes the ‘Location’ point (origin) of <self>.
Parameters: Locat (gp_Pnt2d) – Return type: None

Transformed
()¶  Transforms an axis placement with a Trsf.
Parameters: T (gp_Trsf2d) – Return type: gp_Ax2d

Translate
()¶ Parameters: Return type: Return type:

Translated
()¶  Translates an axis placement in the direction of the vector <V>. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec2d) – Return type: gp_Ax2d  Translates an axis placement from the point <P1> to the point <P2>.
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Ax3
(*args)¶ Bases:
object
 Creates an object corresponding to the reference coordinate system (OXYZ).
Return type: None  Creates a coordinate system from a righthanded coordinate system.
Parameters: A (gp_Ax2) – Return type: None  Creates a right handed axis placement with the ‘Location’ point P and two directions, N gives the ‘Direction’ and Vx gives the ‘XDirection’. Raises ConstructionError if N and Vx are parallel (same or opposite orientation).
Parameters: Return type:  Creates an axis placement with the ‘Location’ point <P> and the normal direction <V>.
Parameters: Return type: 
Angle
()¶  Computes the angular value between the main direction of <self> and the main direction of <Other>. Returns the angle between 0 and PI in radians.
Parameters: Other (gp_Ax3) – Return type: float

Ax2
()¶  Computes a righthanded 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 righthanded, the result returned is the same coordinate system. If this coordinate system is lefthanded, the result is reversed.
Return type: gp_Ax2

Axis
()¶  Returns the main axis of <self>. It is the ‘Location’ point and the main ‘Direction’.
Return type: gp_Ax1

Direct
()¶  Returns True if the coordinate system is righthanded. i.e. XDirection().Crossed(YDirection()).Dot(Direction()) > 0
Return type: bool

IsCoplanar
()¶  Returns True if . the distance between the ‘Location’ point of <self> and <Other> is lower or equal to LinearTolerance and . the distance between the ‘Location’ point of <Other> and <self> is lower or equal to LinearTolerance and . the main direction of <self> and the main direction of <Other> are parallel (same or opposite orientation).
Parameters: Return type:  Returns True if . the distance between <self> and the ‘Location’ point of A1 is lower of equal to LinearTolerance and . the distance between A1 and the ‘Location’ point of <self> is lower or equal to LinearTolerance and . the main direction of <self> and the direction of A1 are normal.
Parameters: Return type:

Mirror
()¶ Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of an axis placement with respect to the point P 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: P (gp_Pnt) – Return type: gp_Ax3  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: A1 (gp_Ax1) – Return type: gp_Ax3  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). 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: A2 (gp_Ax2) – Return type: gp_Ax3

Rotated
()¶  Rotates an axis placement. <A1> is the axis of the rotation . Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Applies a scaling transformation on the axis placement. The ‘Location’ point of the axisplacement is modified. Warnings : If the scale <S> 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: Return type:

SetAxis
()¶  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.  The orientation of this coordinate system (righthanded or lefthanded) is not modified. Raises ConstructionError if the ‘Direction’ of <A1> and the ‘XDirection’ of <self> are parallel (same or opposite orientation) because it is impossible to calculate the new ‘XDirection’ and the new ‘YDirection’.
Parameters: A1 (gp_Ax1) – Return type: None

SetDirection
()¶  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).  The orientation of this coordinate system (left or righthanded) is not modified. Raises ConstructionError if <V< and the previous ‘XDirection’ are parallel because it is impossible to calculate the new ‘XDirection’ and the new ‘YDirection’.
Parameters: V (gp_Dir) – Return type: None

SetLocation
()¶  Changes the ‘Location’ point (origin) of <self>.
Parameters: P (gp_Pnt) – Return type: None

SetXDirection
()¶  Changes the ‘Xdirection’ of <self>. 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). Raises ConstructionError if <Vx> is parallel (same or opposite orientation) to the main direction of <self>
Parameters: Vx (gp_Dir) – Return type: None

SetYDirection
()¶  Changes the ‘Ydirection’ of <self>. 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). Raises ConstructionError if <Vy> is parallel to the main direction of <self>
Parameters: Vy (gp_Dir) – Return type: None

Transformed
()¶  Transforms an axis placement with a Trsf. The ‘Location’ point, the ‘XDirection’ and the ‘YDirection’ are transformed with T. The resulting main ‘Direction’ of <self> is the cross product between the ‘XDirection’ and the ‘YDirection’ after transformation.
Parameters: T (gp_Trsf) – Return type: gp_Ax3

Translated
()¶  Translates an axis plaxement in the direction of the vector <V>. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec) – Return type: gp_Ax3  Translates an axis placement from the point <P1> to the point <P2>.
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Circ
(*args)¶ Bases:
object
 Creates an indefinite circle.
Return type: None  A2 locates the circle and gives its orientation in 3D space. Warnings : It is not forbidden to create a circle with Radius = 0.0 Raises ConstructionError if Radius < 0.0
Parameters: Return type: 
Axis
()¶  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.
Return type: gp_Ax1

Contains
()¶  Returns True if the point P is on the circumference. The distance between <self> and <P> must be lower or equal to LinearTolerance.
Parameters: Return type:

Distance
()¶  Computes the minimum of distance between the point P and any point on the circumference of the circle.
Parameters: P (gp_Pnt) – Return type: float

Location
()¶  Returns the center of the circle. It is the ‘Location’ point of the local coordinate system of the circle
Return type: gp_Pnt

Mirror
()¶ Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of a circle with respect to the point P which is the center of the symmetry.
Parameters: P (gp_Pnt) – Return type: gp_Circ  Performs the symmetrical transformation of a circle with respect to an axis placement which is the axis of the symmetry.
Parameters: A1 (gp_Ax1) – Return type: gp_Circ  Performs the symmetrical transformation of a circle with respect to a plane. The axis placement A2 locates the plane of the of the symmetry : (Location, XDirection, YDirection).
Parameters: A2 (gp_Ax2) – Return type: gp_Circ

Position
()¶  Returns the position of the circle. It is the local coordinate system of the circle.
Return type: gp_Ax2

Rotated
()¶  Rotates a circle. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales a circle. S is the scaling value. Warnings : If S is negative the radius stay positive but the ‘XAxis’ and the ‘YAxis’ are reversed as for an ellipse.
Parameters: Return type:

SetAxis
()¶  Changes the main axis of the circle. It is the axis perpendicular to the plane of the circle. Raises ConstructionError if the direction of A1 is parallel to the ‘XAxis’ of the circle.
Parameters: A1 (gp_Ax1) – Return type: None

SetLocation
()¶  Changes the ‘Location’ point (center) of the circle.
Parameters: P (gp_Pnt) – Return type: None

SetRadius
()¶  Modifies the radius of this circle. Warning. This class does not prevent the creation of a circle where Radius is null. Exceptions Standard_ConstructionError if Radius is negative.
Parameters: Radius (float) – Return type: None

SquareDistance
()¶  Computes the square distance between <self> and the point P.
Parameters: P (gp_Pnt) – Return type: float

Transformed
()¶  Transforms a circle with the transformation T from class Trsf.
Parameters: T (gp_Trsf) – Return type: gp_Circ

Translated
()¶  Translates a circle in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec) – Return type: gp_Circ  Translates a circle from the point P1 to the point P2.
Parameters: Return type:

XAxis
()¶  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.
Return type: gp_Ax1

YAxis
()¶  Returns the ‘YAxis’ of the circle. This axis and the ‘Xaxis’ define the plane of the conic. The ‘YAxis’ is perpendicular to the ‘Xaxis’.
Return type: gp_Ax1

thisown
¶ The membership flag

class
gp_Circ2d
(*args)¶ Bases:
object
 creates an indefinite circle.
Return type: None  The location point of XAxis is the center of the circle. Warnings : It is not forbidden to create a circle with Radius = 0.0 Raises ConstructionError if Radius < 0.0. Raised if Radius < 0.0.
Parameters: Return type:  Axis defines the Xaxis and Yaxis of the circle which defines the origin and the sense of parametrization. The location point of Axis is the center of the circle. Warnings : It is not forbidden to create a circle with Radius = 0.0 Raises ConstructionError if Radius < 0.0. Raised if Radius < 0.0.
Parameters: Return type: 
Coefficients
()¶  Returns the normalized coefficients from the implicit equation of the circle : A * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.0
Parameters:  A (float &) –
 B (float &) –
 C (float &) –
 D (float &) –
 E (float &) –
 F (float &) –
Return type:

Contains
()¶  Does <self> contain P ? Returns True if the distance between P and any point on the circumference of the circle is lower of equal to <LinearTolerance>.
Parameters: Return type:

Distance
()¶  Computes the minimum of distance between the point P and any point on the circumference of the circle.
Parameters: P (gp_Pnt2d) – Return type: float

IsDirect
()¶  Returns true if the local coordinate system is direct and false in the other case.
Return type: bool

Mirrored
()¶  Performs the symmetrical transformation of a circle with respect to the point P which is the center of the symmetry
Parameters: P (gp_Pnt2d) – Return type: gp_Circ2d  Performs the symmetrical transformation of a circle with respect to an axis placement which is the axis of the symmetry.
Parameters: A (gp_Ax2d) – Return type: gp_Circ2d

Reverse
()¶  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,
Return type: None

Reversed
()¶  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.
Return type: gp_Circ2d

Rotated
()¶  Rotates a circle. P is the center of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales a circle. S is the scaling value. Warnings : If S is negative the radius stay positive but the ‘XAxis’ and the ‘YAxis’ are reversed as for an ellipse.
Parameters: Return type:

SetLocation
()¶  Changes the location point (center) of the circle.
Parameters: P (gp_Pnt2d) – Return type: None

SetRadius
()¶  Modifies the radius of this circle. This class does not prevent the creation of a circle where Radius is null. Exceptions Standard_ConstructionError if Radius is negative.
Parameters: Radius (float) – Return type: None

SquareDistance
()¶  Computes the square distance between <self> and the point P.
Parameters: P (gp_Pnt2d) – Return type: float

Transformed
()¶  Transforms a circle with the transformation T from class Trsf2d.
Parameters: T (gp_Trsf2d) – Return type: gp_Circ2d

Translate
()¶ Parameters: Return type: Return type:

Translated
()¶  Translates a circle in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec2d) – Return type: gp_Circ2d  Translates a circle from the point P1 to the point P2.
Parameters: Return type:

YAxis
()¶  Returns the Y axis of the circle. Reverses the direction of the circle.
Return type: gp_Ax2d

thisown
¶ The membership flag

class
gp_Cone
(*args)¶ Bases:
object
 Creates an indefinite Cone.
Return type: None  Creates an infinite conical surface. A3 locates the cone in the space and defines the reference plane of the surface. Ang is the conical surface semiangle between 0 and PI/2 radians. Radius is the radius of the circle in the reference plane of the cone. Raises ConstructionError . if Radius is lower than 0.0 . Ang < Resolution from gp or Ang >= (PI/2)  Resolution.
Parameters: Return type: 
Apex
()¶  Computes the cone’s top. The Apex of the cone is on the negative side of the symmetry axis of the cone.
Return type: gp_Pnt

Coefficients
()¶  Computes the coefficients of the implicit equation of the quadric in the absolute cartesian coordinates system : A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) + 2.(C1.X + C2.Y + C3.Z) + D = 0.0
Parameters:  A1 (float &) –
 A2 (float &) –
 A3 (float &) –
 B1 (float &) –
 B2 (float &) –
 B3 (float &) –
 C1 (float &) –
 C2 (float &) –
 C3 (float &) –
 D (float &) –
Return type:

Direct
()¶  Returns true if the local coordinate system of this cone is righthanded.
Return type: bool

Mirror
()¶ Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of a cone with respect to the point P which is the center of the symmetry.
Parameters: P (gp_Pnt) – Return type: gp_Cone  Performs the symmetrical transformation of a cone with respect to an axis placement which is the axis of the symmetry.
Parameters: A1 (gp_Ax1) – Return type: gp_Cone  Performs the symmetrical transformation of a cone with respect to a plane. The axis placement A2 locates the plane of the of the symmetry : (Location, XDirection, YDirection).
Parameters: A2 (gp_Ax2) – Return type: gp_Cone

Rotated
()¶  Rotates a cone. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales a cone. S is the scaling value. The absolute value of S is used to scale the cone
Parameters: Return type:

SetAxis
()¶  Changes the symmetry axis of the cone. Raises ConstructionError the direction of A1 is parallel to the ‘XDirection’ of the coordinate system of the cone.
Parameters: A1 (gp_Ax1) – Return type: None

SetPosition
()¶  Changes the local coordinate system of the cone. This coordinate system defines the reference plane of the cone.
Parameters: A3 (gp_Ax3) – Return type: None

SetRadius
()¶  Changes the radius of the cone in the reference plane of the cone. Raised if R < 0.0
Parameters: R (float) – Return type: None

SetSemiAngle
()¶  Changes the semiangle of the cone. Ang is the conical surface semiangle ]0,PI/2[. Raises ConstructionError if Ang < Resolution from gp or Ang >= PI/2  Resolution
Parameters: Ang (float) – Return type: None

Transformed
()¶  Transforms a cone with the transformation T from class Trsf.
Parameters: T (gp_Trsf) – Return type: gp_Cone

Translated
()¶  Translates a cone in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec) – Return type: gp_Cone  Translates a cone from the point P1 to the point P2.
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Cylinder
(*args)¶ Bases:
object
 Creates a indefinite cylinder.
Return type: None  Creates a cylinder of radius Radius, whose axis is the ‘main Axis’ of A3. A3 is the local coordinate system of the cylinder. Raises ConstructionErrord if R < 0.0
Parameters: Return type: 
Coefficients
()¶  Computes the coefficients of the implicit equation of the quadric in the absolute cartesian coordinate system : A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) + 2.(C1.X + C2.Y + C3.Z) + D = 0.0
Parameters:  A1 (float &) –
 A2 (float &) –
 A3 (float &) –
 B1 (float &) –
 B2 (float &) –
 B3 (float &) –
 C1 (float &) –
 C2 (float &) –
 C3 (float &) –
 D (float &) –
Return type:

Direct
()¶  Returns true if the local coordinate system of this cylinder is righthanded.
Return type: bool

Mirror
()¶ Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of a cylinder with respect to the point P which is the center of the symmetry.
Parameters: P (gp_Pnt) – Return type: gp_Cylinder  Performs the symmetrical transformation of a cylinder with respect to an axis placement which is the axis of the symmetry.
Parameters: A1 (gp_Ax1) – Return type: gp_Cylinder  Performs the symmetrical transformation of a cylinder with respect to a plane. The axis placement A2 locates the plane of the of the symmetry : (Location, XDirection, YDirection).
Parameters: A2 (gp_Ax2) – Return type: gp_Cylinder

Rotated
()¶  Rotates a cylinder. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales a cylinder. S is the scaling value. The absolute value of S is used to scale the cylinder
Parameters: Return type:

SetAxis
()¶  Changes the symmetry axis of the cylinder. Raises ConstructionError if the direction of A1 is parallel to the ‘XDirection’ of the coordinate system of the cylinder.
Parameters: A1 (gp_Ax1) – Return type: None

SetPosition
()¶  Change the local coordinate system of the surface.
Parameters: A3 (gp_Ax3) – Return type: None

SetRadius
()¶  Modifies the radius of this cylinder. Exceptions Standard_ConstructionError if R is negative.
Parameters: R (float) – Return type: None

Transformed
()¶  Transforms a cylinder with the transformation T from class Trsf.
Parameters: T (gp_Trsf) – Return type: gp_Cylinder

Translated
()¶  Translates a cylinder in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec) – Return type: gp_Cylinder  Translates a cylinder from the point P1 to the point P2.
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Dir
(*args)¶ Bases:
object
 Creates a direction corresponding to X axis.
Return type: None  Normalizes the vector V and creates a direction. Raises ConstructionError if V.Magnitude() <= Resolution.
Parameters: V (gp_Vec) – Return type: None  Creates a direction from a triplet of coordinates. Raises ConstructionError if Coord.Modulus() <= Resolution from gp.
Parameters: Coord (gp_XYZ) – Return type: None  Creates a direction with its 3 cartesian coordinates. Raises ConstructionError if Sqrt(Xv*Xv + Yv*Yv + Zv*Zv) <= Resolution Modification of the direction’s coordinates If Sqrt (X*X + Y*Y + Z*Z) <= Resolution from gp where X, Y ,Z are the new coordinates it is not possible to construct the direction and the method raises the exception ConstructionError.
Parameters: Return type: 
Angle
()¶  Computes the angular value in radians between <self> and <Other>. This value is always positive in 3D space. Returns the angle in the range [0, PI]
Parameters: Other (gp_Dir) – Return type: float

AngleWithRef
()¶  Computes the angular value between <self> and <Other>. <VRef> is the direction of reference normal to <self> and <Other> and its orientation gives the positive sense of rotation. If the cross product <self> ^ <Other> has the same orientation as <VRef> the angular value is positive else negative. Returns the angular value in the range PI and PI (in radians). Raises DomainError if <self> and <Other> are not parallel this exception is raised when <VRef> is in the same plane as <self> and <Other> The tolerance criterion is Resolution from package gp.
Parameters: Return type:

Coord
()¶  Returns the coordinate of range Index : Index = 1 => X is returned Index = 2 => Y is returned Index = 3 => Z is returned Exceptions Standard_OutOfRange if Index is not 1, 2, or 3.
Parameters: Index (int) – Return type: float  Returns for the unit vector its three coordinates Xv, Yv, and Zv.
Parameters:  Xv (float &) –
 Yv (float &) –
 Zv (float &) –
Return type:

Cross
()¶  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: Right (gp_Dir) – Return type: None

CrossCrossed
()¶  Computes the double vector product this ^ (V1 ^ V2).  CrossCrossed creates a new unit vector. Exceptions Standard_ConstructionError if:  V1 and V2 are parallel, or  this unit vector and (V1 ^ V2) are parallel. This is because, in these conditions, the computed vector is null and cannot be normalized.
Parameters: Return type:

Crossed
()¶  Computes the triple vector product. <self> ^ (V1 ^ V2) Raises the exception ConstructionError if V1 and V2 are parallel or <self> and (V1^V2) are parallel because the computed vector can’t be normalized to create a direction.
Parameters: Right (gp_Dir) – Return type: gp_Dir

DotCross
()¶  Computes the triple scalar product <self> * (V1 ^ V2). Warnings : The computed vector V1’ = V1 ^ V2 is not normalized to create a unitary vector. So this method never raises an exception even if V1 and V2 are parallel.
Parameters: Return type:

IsEqual
()¶  Returns True if the angle between the two directions is lower or equal to AngularTolerance.
Parameters: Return type:

IsNormal
()¶  Returns True if the angle between this unit vector and the unit vector Other is equal to Pi/2 (normal).
Parameters: Return type:

IsOpposite
()¶  Returns True if the angle between this unit vector and the unit vector Other is equal to Pi (opposite).
Parameters: Return type:

IsParallel
()¶  Returns true if the angle between this unit vector and the unit vector Other is equal to 0 or to Pi. Note: the tolerance criterion is given by AngularTolerance.
Parameters: Return type:

Mirror
()¶ Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of a direction with respect to the direction V which is the center of the symmetry.
Parameters: V (gp_Dir) – Return type: gp_Dir  Performs the symmetrical transformation of a direction with respect to an axis placement which is the axis of the symmetry.
Parameters: A1 (gp_Ax1) – Return type: gp_Dir  Performs the symmetrical transformation of a direction with respect to a plane. The axis placement A2 locates the plane of the symmetry : (Location, XDirection, YDirection).
Parameters: A2 (gp_Ax2) – Return type: gp_Dir

Reversed
()¶  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.]
Return type: gp_Dir

Rotated
()¶  Rotates a direction. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

SetCoord
()¶  For this unit vector, assigns the value Xi to:  the X coordinate if Index is 1, or  the Y coordinate if Index is 2, or  the Z coordinate if Index 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 Index is not 1, 2, or 3. Standard_ConstructionError if either of the following is less than or equal to gp::Resolution():  Sqrt(Xv*Xv + Yv*Yv + Zv*Zv), or  the modulus of the number triple formed by the new value Xi and the two other coordinates of this vector that were not directly modified.
Parameters: Return type:  For this unit vector, assigns the values Xv, Yv and Zv to its three coordinates. Remember that all the coordinates of a unit vector are implicitly modified when any single one is changed directly.
Parameters: Return type:

SetX
()¶  Assigns the given value to the X coordinate of this unit vector.
Parameters: X (float) – Return type: None

SetXYZ
()¶  Assigns the three coordinates of Coord to this unit vector.
Parameters: Coord (gp_XYZ) – Return type: None

SetY
()¶  Assigns the given value to the Y coordinate of this unit vector.
Parameters: Y (float) – Return type: None

SetZ
()¶  Assigns the given value to the Z coordinate of this unit vector.
Parameters: Z (float) – Return type: None

Transformed
()¶  Transforms a direction with a ‘Trsf’ from gp. Warnings : If the scale factor of the ‘Trsf’ T is negative then the direction <self> is reversed.
Parameters: T (gp_Trsf) – Return type: gp_Dir

thisown
¶ The membership flag

class
gp_Dir2d
(*args)¶ Bases:
object
 Creates a direction corresponding to X axis.
Return type: None  Normalizes the vector V and creates a Direction. Raises ConstructionError if V.Magnitude() <= Resolution from gp.
Parameters: V (gp_Vec2d) – Return type: None  Creates a Direction from a doublet of coordinates. Raises ConstructionError if Coord.Modulus() <= Resolution from gp.
Parameters: Coord (gp_XY) – Return type: None  Creates a Direction with its 2 cartesian coordinates. Raises ConstructionError if Sqrt(Xv*Xv + Yv*Yv) <= Resolution from gp.
Parameters: Return type: 
Angle
()¶  Computes the angular value in radians between <self> and <Other>. Returns the angle in the range [PI, PI].
Parameters: Other (gp_Dir2d) – Return type: float

Coord
()¶  For this unit vector returns the coordinate of range Index : Index = 1 => X is returned Index = 2 => Y is returned Raises OutOfRange if Index != {1, 2}.
Parameters: Index (int) – Return type: float  For this unit vector returns its two coordinates Xv and Yv. Raises OutOfRange if Index != {1, 2}.
Parameters:  Xv (float &) –
 Yv (float &) –
Return type:

Crossed
()¶  Computes the cross product between two directions.
Parameters: Right (gp_Dir2d) – Return type: float

IsEqual
()¶  Returns True if the two vectors have the same direction i.e. the angle between this unit vector and the unit vector Other is less than or equal to AngularTolerance.
Parameters: Return type:

IsNormal
()¶  Returns True if the angle between this unit vector and the unit vector Other is equal to Pi/2 or Pi/2 (normal) i.e. Abs(Abs(<self>.Angle(Other))  PI/2.) <= AngularTolerance
Parameters: Return type:

IsOpposite
()¶  Returns True if the angle between this unit vector and the unit vector Other is equal to Pi or Pi (opposite). i.e. PI  Abs(<self>.Angle(Other)) <= AngularTolerance
Parameters: Return type:

IsParallel
()¶  returns true if if the angle between this unit vector and unit vector Other is equal to 0, Pi or Pi. i.e. Abs(Angle(<self>, Other)) <= AngularTolerance or PI  Abs(Angle(<self>, Other)) <= AngularTolerance
Parameters: Return type:

Mirrored
()¶  Performs the symmetrical transformation of a direction with respect to the direction V which is the center of the symmetry.
Parameters: V (gp_Dir2d) – Return type: gp_Dir2d  Performs the symmetrical transformation of a direction with respect to an axis placement which is the axis of the symmetry.
Parameters: A (gp_Ax2d) – Return type: gp_Dir2d

Rotated
()¶  Rotates a direction. Ang is the angular value of the rotation in radians.
Parameters: Ang (float) – Return type: gp_Dir2d

SetCoord
()¶  For this unit vector, assigns: the value Xi to:  the X coordinate if Index is 1, or  the Y coordinate if Index 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 Index is not 1 or 2. Standard_ConstructionError if either of the following is less than or equal to gp::Resolution():  Sqrt(Xv*Xv + Yv*Yv), 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 Index != {1, 2}.
Parameters: Return type:  For this unit vector, assigns:  the values Xv and Yv 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 Index is not 1 or 2. Standard_ConstructionError if either of the following is less than or equal to gp::Resolution():  Sqrt(Xv*Xv + Yv*Yv), 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 Index != {1, 2}.
Parameters: Return type:

SetX
()¶  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: X (float) – Return type: None

SetXY
()¶  Assigns:  the two coordinates of Coord 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 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: Coord (gp_XY) – Return type: None

SetY
()¶  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: Y (float) – Return type: None

Transformed
()¶  Transforms a direction with the ‘Trsf’ T. Warnings : If the scale factor of the ‘Trsf’ T is negative then the direction <self> is reversed.
Parameters: T (gp_Trsf2d) – Return type: gp_Dir2d

XY
()¶  For this unit vector, returns its two coordinates as a number pair. Comparison between Directions The precision value is an input data.
Return type: gp_XY

thisown
¶ The membership flag

class
gp_Elips
(*args)¶ Bases:
object
 Creates an indefinite ellipse.
Return type: None  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 A2 and the ‘YAxis’ is defined with the ‘YDirection’ of A2. Warnings : It is not forbidden to create an ellipse with MajorRadius = MinorRadius. Raises ConstructionError if MajorRadius < MinorRadius or MinorRadius < 0.
Parameters: Return type: 
Directrix1
()¶  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_Ax1 object), 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).
Return type: gp_Ax1

Directrix2
()¶  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).
Return type: gp_Ax1

Eccentricity
()¶  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
Return type: float

Focal
()¶  Computes the focal distance. It is the distance between the two focus focus1 and focus2 of the ellipse.
Return type: float

Focus1
()¶  Returns the first focus of the ellipse. This focus is on the positive side of the ‘XAxis’ of the ellipse.
Return type: gp_Pnt

Focus2
()¶  Returns the second focus of the ellipse. This focus is on the negative side of the ‘XAxis’ of the ellipse.
Return type: gp_Pnt

Location
()¶  Returns the center of the ellipse. It is the ‘Location’ point of the coordinate system of the ellipse.
Return type: gp_Pnt

Mirror
()¶ Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of an ellipse with respect to the point P which is the center of the symmetry.
Parameters: P (gp_Pnt) – Return type: gp_Elips  Performs the symmetrical transformation of an ellipse with respect to an axis placement which is the axis of the symmetry.
Parameters: A1 (gp_Ax1) – Return type: gp_Elips  Performs the symmetrical transformation of an ellipse with respect to a plane. The axis placement A2 locates the plane of the symmetry (Location, XDirection, YDirection).
Parameters: A2 (gp_Ax2) – Return type: gp_Elips

Parameter
()¶  Returns p = (1  e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0
Return type: float

Rotated
()¶  Rotates an ellipse. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales an ellipse. S is the scaling value.
Parameters: Return type:

SetAxis
()¶  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 A1 (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 A1 is parallel to the direction of the ‘XAxis’ of the ellipse.
Parameters: A1 (gp_Ax1) – Return type: None

SetLocation
()¶  Modifies this ellipse, by redefining its local coordinate so that its origin becomes P.
Parameters: P (gp_Pnt) – Return type: None

SetMajorRadius
()¶  The major radius of the ellipse is on the ‘XAxis’ (major axis) of the ellipse. Raises ConstructionError if MajorRadius < MinorRadius.
Parameters: MajorRadius (float) – Return type: None

SetMinorRadius
()¶  The minor radius of the ellipse is on the ‘YAxis’ (minor axis) of the ellipse. Raises ConstructionError if MinorRadius > MajorRadius or MinorRadius < 0.
Parameters: MinorRadius (float) – Return type: None

SetPosition
()¶  Modifies this ellipse, by redefining its local coordinate so that it becomes A2e.
Parameters: A2 (gp_Ax2) – Return type: None

Transformed
()¶  Transforms an ellipse with the transformation T from class Trsf.
Parameters: T (gp_Trsf) – Return type: gp_Elips

Translated
()¶  Translates an ellipse in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec) – Return type: gp_Elips  Translates an ellipse from the point P1 to the point P2.
Parameters: Return type:

XAxis
()¶  Returns the ‘XAxis’ of the ellipse whose origin is the center of this ellipse. It is the major axis of the ellipse.
Return type: gp_Ax1

YAxis
()¶  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.
Return type: gp_Ax1

thisown
¶ The membership flag

class
gp_Elips2d
(*args)¶ Bases:
object
 Creates an indefinite ellipse.
Return type: None  Creates an ellipse with the major axis, the major and the minor radius. The location of the MajorAxis is the center of the ellipse. The sense of parametrization is given by Sense. Warnings : It is possible to create an ellipse with MajorRadius = MinorRadius. Raises ConstructionError if MajorRadius < MinorRadius or MinorRadius < 0.0
Parameters: Return type:  Creates an ellipse with radii MajorRadius and MinorRadius, positioned in the plane by coordinate system A where:  the origin of A is the center of the ellipse,  the ‘X Direction’ of A defines the major axis of the ellipse, that is, the major radius MajorRadius is measured along this axis, and  the ‘Y Direction’ of A defines the minor axis of the ellipse, that is, the minor radius MinorRadius is measured along this axis, and  the orientation (direct or indirect sense) of A gives the orientation of the ellipse. Warnings : It is possible to create an ellipse with MajorRadius = MinorRadius. Raises ConstructionError if MajorRadius < MinorRadius or MinorRadius < 0.0
Parameters: Return type: 
Coefficients
()¶  Returns the coefficients of the implicit equation of the ellipse. A * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.
Parameters:  A (float &) –
 B (float &) –
 C (float &) –
 D (float &) –
 E (float &) –
 F (float &) –
Return type:

Directrix1
()¶  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)
Return type: gp_Ax2d

Directrix2
()¶  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).
Return type: gp_Ax2d

Eccentricity
()¶  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.
Return type: float

Focal
()¶  Returns the distance between the center of the ellipse and focus1 or focus2.
Return type: float

Focus1
()¶  Returns the first focus of the ellipse. This focus is on the positive side of the major axis of the ellipse.
Return type: gp_Pnt2d

Focus2
()¶  Returns the second focus of the ellipse. This focus is on the negative side of the major axis of the ellipse.
Return type: gp_Pnt2d

IsDirect
()¶  Returns true if the local coordinate system is direct and false in the other case.
Return type: bool

Mirrored
()¶  Performs the symmetrical transformation of a ellipse with respect to the point P which is the center of the symmetry
Parameters: P (gp_Pnt2d) – Return type: gp_Elips2d  Performs the symmetrical transformation of a ellipse with respect to an axis placement which is the axis of the symmetry.
Parameters: A (gp_Ax2d) – Return type: gp_Elips2d

Parameter
()¶  Returns p = (1  e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0
Return type: float

Reversed
()¶ Return type: gp_Elips2d

Rotated
()¶ Parameters: Return type:

Scaled
()¶  Scales a ellipse. S is the scaling value.
Parameters: Return type:

SetAxis
()¶  Modifies this ellipse, by redefining its local coordinate system so that it becomes A.
Parameters: A (gp_Ax22d) – Return type: None

SetLocation
()¶  Modifies this ellipse, by redefining its local coordinate system so that  its origin becomes P.
Parameters: P (gp_Pnt2d) – Return type: None

SetMajorRadius
()¶  Changes the value of the major radius. Raises ConstructionError if MajorRadius < MinorRadius.
Parameters: MajorRadius (float) – Return type: None

SetMinorRadius
()¶  Changes the value of the minor radius. Raises ConstructionError if MajorRadius < MinorRadius or MinorRadius < 0.0
Parameters: MinorRadius (float) – Return type: None

SetXAxis
()¶  Modifies this ellipse, by redefining its local coordinate system so that its origin and its ‘X Direction’ become those of the axis A. The ‘Y Direction’ is then recomputed. The orientation of the local coordinate system is not modified.
Parameters: A (gp_Ax2d) – Return type: None

SetYAxis
()¶  Modifies this ellipse, by redefining its local coordinate system so that its origin and its ‘Y Direction’ become those of the axis A. The ‘X Direction’ is then recomputed. The orientation of the local coordinate system is not modified.
Parameters: A (gp_Ax2d) – Return type: None

Transformed
()¶  Transforms an ellipse with the transformation T from class Trsf2d.
Parameters: T (gp_Trsf2d) – Return type: gp_Elips2d

Translate
()¶ Parameters: Return type: Return type:

Translated
()¶  Translates a ellipse in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec2d) – Return type: gp_Elips2d  Translates a ellipse from the point P1 to the point P2.
Parameters: Return type:

YAxis
()¶  Returns the minor axis of the ellipse. Reverses the direction of the circle.
Return type: gp_Ax2d

thisown
¶ The membership flag

class
gp_GTrsf
(*args)¶ Bases:
object
 Returns the Identity transformation.
Return type: None  Converts the gp_Trsf transformation T into a general transformation, i.e. Returns a GTrsf with the same matrix of coefficients as the Trsf T.
Parameters: T (gp_Trsf) – Return type: None  Creates a transformation based on the matrix M and the vector V where M defines the vectorial part of the transformation, and V the translation part, or
Parameters: Return type: 
Form
()¶  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.
Return type: gp_TrsfForm

Inverted
()¶  Computes the reverse transformation. Raises an exception if the matrix of the transformation is not inversible.
Return type: gp_GTrsf

IsNegative
()¶  Returns true if the determinant of the vectorial part of this transformation is negative.
Return type: bool

IsSingular
()¶  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.
Return type: bool

Multiplied
()¶  Computes the transformation composed from T and <self>. In a C++ implementation you can also write Tcomposed = <self> * T. Example : GTrsf T1, T2, Tcomp; ............... //composition : Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1) // transformation of a point XYZ P(10.,3.,4.); XYZ P1(P); Tcomp.Transforms(P1); //using Tcomp XYZ P2(P); T1.Transforms(P2); //using T1 then T2 T2.Transforms(P2); // P1 = P2 !!!
Parameters: T (gp_GTrsf) – Return type: gp_GTrsf

Multiply
()¶  Computes the transformation composed with <self> and T. <self> = <self> * T C++: alias operator *=
Parameters: T (gp_GTrsf) – Return type: None

Powered
()¶  Computes:  the product of this transformation multiplied by itself N times, if N is positive, or  the product of the inverse of this transformation multiplied by itself N times, if N is negative. If N equals zero, the result is equal to the Identity transformation. I.e.: <self> * <self> * .......* <self>, N time. if N =0 <self> = Identity if N < 0 <self> = <self>.Inverse() ........... <self>.Inverse(). //! Raises an exception if N < 0 and if the matrix of the transformation not inversible.
Parameters: N (int) – Return type: gp_GTrsf

PreMultiply
()¶  Computes the product of the transformation T and this transformation and assigns the result to this transformation. this = T * this
Parameters: T (gp_GTrsf) – Return type: None

SetAffinity
()¶  Changes this transformation into an affinity of ratio Ratio with respect to the axis A1. Note: an affinity is a pointbypoint 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 A2, the vectors HP and HP’ satisfy: HP’ = Ratio * HP.
Parameters: Return type:  Changes this transformation into an affinity of ratio Ratio with respect to the plane defined by the origin, the ‘X Direction’ and the ‘Y Direction’ of coordinate system A2. Note: an affinity is a pointbypoint 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 A2, the vectors HP and HP’ satisfy: HP’ = Ratio * HP.
Parameters: Return type:

SetForm
()¶  verify and set the shape of the GTrsf Other or CompoundTrsf Ex : myGTrsf.SetValue(row1,col1,val1); myGTrsf.SetValue(row2,col2,val2); ... myGTrsf.SetForm();
Return type: None

SetTranslationPart
()¶  Replaces the translation part of this transformation by the coordinates of the number triple Coord.
Parameters: Coord (gp_XYZ) – Return type: None

SetTrsf
()¶  Assigns the vectorial and translation parts of T to this transformation.
Parameters: T (gp_Trsf) – Return type: None

SetValue
()¶  Replaces the coefficient (Row, Col) of the matrix representing this transformation by Value. Raises OutOfRange if Row < 1 or Row > 3 or Col < 1 or Col > 4
Parameters: Return type:

SetVectorialPart
()¶  Replaces the vectorial part of this transformation by Matrix.
Parameters: Matrix (gp_Mat) – Return type: None

Transforms
()¶ Parameters: Coord (gp_XYZ) – Return type: None  Transforms a triplet XYZ with a GTrsf.
Parameters:  X (float &) –
 Y (float &) –
 Z (float &) –
Return type:

Value
()¶  Returns the coefficients of the global matrix of transformation. Raises OutOfRange if Row < 1 or Row > 3 or Col < 1 or Col > 4
Parameters: Return type:

VectorialPart
()¶  Computes the vectorial part of the GTrsf. The returned Matrix is a 3*3 matrix.
Return type: gp_Mat

thisown
¶ The membership flag

class
gp_GTrsf2d
(*args)¶ Bases:
object
 returns identity transformation.
Return type: None  Converts the gp_Trsf2d transformation T into a general transformation.
Parameters: T (gp_Trsf2d) – Return type: None  Creates a transformation based on the matrix M and the vector V where M defines the vectorial part of the transformation, and V the translation part.
Parameters: Return type: 
Form
()¶  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.
Return type: gp_TrsfForm

Inverted
()¶  Computes the reverse transformation. Raised an exception if the matrix of the transformation is not inversible.
Return type: gp_GTrsf2d

IsNegative
()¶  Returns true if the determinant of the vectorial part of this transformation is negative.
Return type: bool

IsSingular
()¶  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.
Return type: bool

Multiplied
()¶  Computes the transformation composed with T and <self>. In a C++ implementation you can also write Tcomposed = <self> * T. Example : GTrsf2d T1, T2, Tcomp; ............... //composition : Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1) // transformation of a point XY P(10.,3.); XY P1(P); Tcomp.Transforms(P1); //using Tcomp XY P2(P); T1.Transforms(P2); //using T1 then T2 T2.Transforms(P2); // P1 = P2 !!!
Parameters: T (gp_GTrsf2d) – Return type: gp_GTrsf2d

Multiply
()¶ Parameters: T (gp_GTrsf2d) – Return type: None

Powered
()¶  Computes the following composition of transformations <self> * <self> * .......* <self>, N time. if N = 0 <self> = Identity if N < 0 <self> = <self>.Inverse() ........... <self>.Inverse(). //! Raises an exception if N < 0 and if the matrix of the transformation is not inversible.
Parameters: N (int) – Return type: gp_GTrsf2d

PreMultiply
()¶  Computes the product of the transformation T and this transformation, and assigns the result to this transformation: this = T * this
Parameters: T (gp_GTrsf2d) – Return type: None

SetAffinity
()¶  Changes this transformation into an affinity of ratio Ratio with respect to the axis A. Note: An affinity is a pointbypoint transformation that transforms any point P into a point P’ such that if H is the orthogonal projection of P on the axis A, the vectors HP and HP’ satisfy: HP’ = Ratio * HP.
Parameters: Return type:

SetTranslationPart
()¶  Replacesthe translation part of this transformation by the coordinates of the number pair Coord.
Parameters: Coord (gp_XY) – Return type: None

SetTrsf2d
()¶  Assigns the vectorial and translation parts of T to this transformation.
Parameters: T (gp_Trsf2d) – Return type: None

SetValue
()¶  Replaces the coefficient (Row, Col) of the matrix representing this transformation by Value, Raises OutOfRange if Row < 1 or Row > 2 or Col < 1 or Col > 3
Parameters: Return type:

SetVectorialPart
()¶  Replaces the vectorial part of this transformation by Matrix.
Parameters: Matrix (gp_Mat2d) – Return type: None

Transforms
()¶ Parameters: Coord (gp_XY) – Return type: None  Applies this transformation to the coordinates:  of the number pair Coord, or  X and Y. //! Note:  Transforms modifies X, Y, or the coordinate pair Coord, while  Transformed creates a new coordinate pair.
Parameters:  X (float &) –
 Y (float &) –
Return type:

Trsf2d
()¶  Converts this transformation into a gp_Trsf2d transformation. Exceptions Standard_ConstructionError if this transformation cannot be converted, i.e. if its form is gp_Other.
Return type: gp_Trsf2d

Value
()¶  Returns the coefficients of the global matrix of transformation. Raised OutOfRange if Row < 1 or Row > 2 or Col < 1 or Col > 3
Parameters: Return type:

VectorialPart
()¶  Computes the vectorial part of the GTrsf2d. The returned Matrix is a 2*2 matrix.
Return type: gp_Mat2d

thisown
¶ The membership flag

class
gp_Hypr
(*args)¶ Bases:
object
 Creates of an indefinite hyperbola.
Return type: None  Creates a hyperbola with radii MajorRadius and MinorRadius, positioned in the space by the coordinate system A2 such that:  the origin of A2 is the center of the hyperbola,  the ‘X Direction’ of A2 defines the major axis of the hyperbola, that is, the major radius MajorRadius is measured along this axis, and  the ‘Y Direction’ of A2 defines the minor axis of the hyperbola, that is, the minor radius MinorRadius is measured along this axis. Note: This class does not prevent the creation of a hyperbola where:  MajorAxis is equal to MinorAxis, or  MajorAxis is less than MinorAxis. Exceptions Standard_ConstructionError if MajorAxis or MinorAxis is negative. Raises ConstructionError if MajorRadius < 0.0 or MinorRadius < 0.0 Raised if MajorRadius < 0.0 or MinorRadius < 0.0
Parameters: Return type: 
Asymptote1
()¶  In the local coordinate system of the hyperbola the equation of the hyperbola is (X*X)/(A*A)  (Y*Y)/(B*B) = 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
Return type: gp_Ax1

Asymptote2
()¶  In the local coordinate system of the hyperbola the equation of the hyperbola is (X*X)/(A*A)  (Y*Y)/(B*B) = 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
Return type: gp_Ax1

Axis
()¶  Returns the axis passing through the center, and normal to the plane of this hyperbola.
Return type: gp_Ax1

ConjugateBranch1
()¶  Computes the branch of hyperbola which is on the positive side of the ‘YAxis’ of <self>.
Return type: gp_Hypr

ConjugateBranch2
()¶  Computes the branch of hyperbola which is on the negative side of the ‘YAxis’ of <self>.
Return type: gp_Hypr

Directrix1
()¶  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’.
Return type: gp_Ax1

Directrix2
()¶  This line is obtained by the symmetrical transformation of ‘Directrix1’ with respect to the ‘YAxis’ of the hyperbola.
Return type: gp_Ax1

Eccentricity
()¶  Returns the excentricity 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
Return type: float

Focal
()¶  Computes the focal distance. It is the distance between the the two focus of the hyperbola.
Return type: float

Focus1
()¶  Returns the first focus of the hyperbola. This focus is on the positive side of the ‘XAxis’ of the hyperbola.
Return type: gp_Pnt

Focus2
()¶  Returns the second focus of the hyperbola. This focus is on the negative side of the ‘XAxis’ of the hyperbola.
Return type: gp_Pnt

Location
()¶  Returns the location point of the hyperbola. It is the intersection point between the ‘XAxis’ and the ‘YAxis’.
Return type: gp_Pnt

MajorRadius
()¶  Returns the major radius of the hyperbola. It is the radius on the ‘XAxis’ of the hyperbola.
Return type: float

MinorRadius
()¶  Returns the minor radius of the hyperbola. It is the radius on the ‘YAxis’ of the hyperbola.
Return type: float

Mirror
()¶ Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of an hyperbola with respect to the point P which is the center of the symmetry.
Parameters: P (gp_Pnt) – Return type: gp_Hypr  Performs the symmetrical transformation of an hyperbola with respect to an axis placement which is the axis of the symmetry.
Parameters: A1 (gp_Ax1) – Return type: gp_Hypr  Performs the symmetrical transformation of an hyperbola with respect to a plane. The axis placement A2 locates the plane of the symmetry (Location, XDirection, YDirection).
Parameters: A2 (gp_Ax2) – Return type: gp_Hypr

OtherBranch
()¶  Returns the branch of hyperbola obtained by doing the symmetrical transformation of <self> with respect to the ‘YAxis’ of <self>.
Return type: gp_Hypr

Parameter
()¶  Returns p = (e * e  1) * MajorRadius where e is the eccentricity of the hyperbola. Raises DomainError if MajorRadius = 0.0
Return type: float

Rotated
()¶  Rotates an hyperbola. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales an hyperbola. S is the scaling value.
Parameters: Return type:

SetAxis
()¶  Modifies this hyperbola, by redefining its local coordinate system so that:  its origin and ‘main Direction’ become those of the axis A1 (the ‘X Direction’ and ‘Y Direction’ are then recomputed in the same way as for any gp_Ax2). Raises ConstructionError if the direction of A1 is parallel to the direction of the ‘XAxis’ of the hyperbola.
Parameters: A1 (gp_Ax1) – Return type: None

SetLocation
()¶  Modifies this hyperbola, by redefining its local coordinate system so that its origin becomes P.
Parameters: P (gp_Pnt) – Return type: None

SetMajorRadius
()¶  Modifies the major radius of this hyperbola. Exceptions Standard_ConstructionError if MajorRadius is negative.
Parameters: MajorRadius (float) – Return type: None

SetMinorRadius
()¶  Modifies the minor radius of this hyperbola. Exceptions Standard_ConstructionError if MinorRadius is negative.
Parameters: MinorRadius (float) – Return type: None

SetPosition
()¶  Modifies this hyperbola, by redefining its local coordinate system so that it becomes A2.
Parameters: A2 (gp_Ax2) – Return type: None

Transformed
()¶  Transforms an hyperbola with the transformation T from class Trsf.
Parameters: T (gp_Trsf) – Return type: gp_Hypr

Translated
()¶  Translates an hyperbola in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec) – Return type: gp_Hypr  Translates an hyperbola from the point P1 to the point P2.
Parameters: Return type:

XAxis
()¶  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.
Return type: gp_Ax1

YAxis
()¶  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
Return type: gp_Ax1

thisown
¶ The membership flag

class
gp_Hypr2d
(*args)¶ Bases:
object
 Creates of an indefinite hyperbola.
Return type: None  Creates a hyperbola with radii MajorRadius and MinorRadius, centered on the origin of MajorAxis and where the unit vector of MajorAxis is the ‘X Direction’ of the local coordinate system of the hyperbola. This coordinate system is direct if Sense is true (the default value), and indirect if Sense is false. Warnings : It is yet possible to create an Hyperbola with MajorRadius <= MinorRadius. Raises ConstructionError if MajorRadius < 0.0 or MinorRadius < 0.0
Parameters: Return type:  a hyperbola with radii MajorRadius and MinorRadius, positioned in the plane by coordinate system A where:  the origin of A is the center of the hyperbola,  the ‘X Direction’ of A defines the major axis of the hyperbola, that is, the major radius MajorRadius is measured along this axis, and  the ‘Y Direction’ of A defines the minor axis of the hyperbola, that is, the minor radius MinorRadius is measured along this axis, and  the orientation (direct or indirect sense) of A gives the implicit orientation of the hyperbola. Warnings : It is yet possible to create an Hyperbola with MajorRadius <= MinorRadius. Raises ConstructionError if MajorRadius < 0.0 or MinorRadius < 0.0
Parameters: Return type: 
Asymptote1
()¶  In the local coordinate system of the hyperbola the equation of the hyperbola is (X*X)/(A*A)  (Y*Y)/(B*B) = 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
Return type: gp_Ax2d

Asymptote2
()¶  In the local coordinate system of the hyperbola the equation of the hyperbola is (X*X)/(A*A)  (Y*Y)/(B*B) = 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
Return type: gp_Ax2d

Coefficients
()¶  Computes the coefficients of the implicit equation of the hyperbola : A * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.
Parameters:  A (float &) –
 B (float &) –
 C (float &) –
 D (float &) –
 E (float &) –
 F (float &) –
Return type:

ConjugateBranch1
()¶  Computes the branch of hyperbola which is on the positive side of the ‘YAxis’ of <self>.
Return type: gp_Hypr2d

ConjugateBranch2
()¶  Computes the branch of hyperbola which is on the negative side of the ‘YAxis’ of <self>.
Return type: gp_Hypr2d

Directrix1
()¶  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’.
Return type: gp_Ax2d

Directrix2
()¶  This line is obtained by the symmetrical transformation of ‘Directrix1’ with respect to the ‘YAxis’ of the hyperbola.
Return type: gp_Ax2d

Eccentricity
()¶  Returns the excentricity 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.
Return type: float

Focal
()¶  Computes the focal distance. It is the distance between the ‘Location’ of the hyperbola and ‘Focus1’ or ‘Focus2’.
Return type: float

Focus1
()¶  Returns the first focus of the hyperbola. This focus is on the positive side of the ‘XAxis’ of the hyperbola.
Return type: gp_Pnt2d

Focus2
()¶  Returns the second focus of the hyperbola. This focus is on the negative side of the ‘XAxis’ of the hyperbola.
Return type: gp_Pnt2d

IsDirect
()¶  Returns true if the local coordinate system is direct and false in the other case.
Return type: bool

Location
()¶  Returns the location point of the hyperbola. It is the intersection point between the ‘XAxis’ and the ‘YAxis’.
Return type: gp_Pnt2d

MajorRadius
()¶  Returns the major radius of the hyperbola (it is the radius corresponding to the ‘XAxis’ of the hyperbola).
Return type: float

MinorRadius
()¶  Returns the minor radius of the hyperbola (it is the radius corresponding to the ‘YAxis’ of the hyperbola).
Return type: float

Mirrored
()¶  Performs the symmetrical transformation of an hyperbola with respect to the point P which is the center of the symmetry.
Parameters: P (gp_Pnt2d) – Return type: gp_Hypr2d  Performs the symmetrical transformation of an hyperbola with respect to an axis placement which is the axis of the symmetry.
Parameters: A (gp_Ax2d) – Return type: gp_Hypr2d

OtherBranch
()¶  Returns the branch of hyperbola obtained by doing the symmetrical transformation of <self> with respect to the ‘YAxis’ of <self>.
Return type: gp_Hypr2d

Parameter
()¶  Returns p = (e * e  1) * MajorRadius where e is the eccentricity of the hyperbola. Raises DomainError if MajorRadius = 0.0
Return type: float

Reversed
()¶  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.
Return type: gp_Hypr2d

Rotated
()¶  Rotates an hyperbola. P is the center of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales an hyperbola. <S> is the scaling value. If <S> is positive only the location point is modified. But if <S> is negative the ‘XAxis’ is reversed and the ‘YAxis’ too.
Parameters: Return type:

SetAxis
()¶  Modifies this hyperbola, by redefining its local coordinate system so that it becomes A.
Parameters: A (gp_Ax22d) – Return type: None

SetLocation
()¶  Modifies this hyperbola, by redefining its local coordinate system so that its origin becomes P.
Parameters: P (gp_Pnt2d) – Return type: None

SetMajorRadius
()¶  Modifies the major or minor radius of this hyperbola. Exceptions Standard_ConstructionError if MajorRadius or MinorRadius is negative.
Parameters: MajorRadius (float) – Return type: None

SetMinorRadius
()¶  Modifies the major or minor radius of this hyperbola. Exceptions Standard_ConstructionError if MajorRadius or MinorRadius is negative.
Parameters: MinorRadius (float) – Return type: None

SetXAxis
()¶  Changes the major axis of the hyperbola. The minor axis is recomputed and the location of the hyperbola too.
Parameters: A (gp_Ax2d) – Return type: None

SetYAxis
()¶  Changes the minor axis of the hyperbola.The minor axis is recomputed and the location of the hyperbola too.
Parameters: A (gp_Ax2d) – Return type: None

Transformed
()¶  Transforms an hyperbola with the transformation T from class Trsf2d.
Parameters: T (gp_Trsf2d) – Return type: gp_Hypr2d

Translate
()¶ Parameters: Return type: Return type:

Translated
()¶  Translates an hyperbola in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec2d) – Return type: gp_Hypr2d  Translates an hyperbola from the point P1 to the point P2.
Parameters: Return type:

XAxis
()¶  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.
Return type: gp_Ax2d

YAxis
()¶  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.
Return type: gp_Ax2d

thisown
¶ The membership flag

class
gp_Lin
(*args)¶ Bases:
object
 Creates a Line corresponding to Z axis of the reference coordinate system.
Return type: None  Creates a line defined by axis A1.
Parameters: A1 (gp_Ax1) – Return type: None  Creates a line passing through point P and parallel to vector V (P and V are, respectively, the origin and the unit vector of the positioning axis of the line).
Parameters: Return type: 
Angle
()¶  Computes the angle between two lines in radians.
Parameters: Other (gp_Lin) – Return type: float

Contains
()¶  Returns true if this line contains the point P, that is, if the distance between point P and this line is less than or equal to LinearTolerance..
Parameters: Return type:

Distance
()¶  Computes the distance between <self> and the point P.
Parameters: P (gp_Pnt) – Return type: float  Computes the distance between two lines.
Parameters: Other (gp_Lin) – Return type: float

Mirror
()¶ Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of a line with respect to the point P which is the center of the symmetry.
Parameters: P (gp_Pnt) – Return type: gp_Lin  Performs the symmetrical transformation of a line with respect to an axis placement which is the axis of the symmetry.
Parameters: A1 (gp_Ax1) – Return type: gp_Lin  Performs the symmetrical transformation of a line with respect to a plane. The axis placement <A2> locates the plane of the symmetry : (Location, XDirection, YDirection).
Parameters: A2 (gp_Ax2) – Return type: gp_Lin

Normal
()¶  Computes the line normal to the direction of <self>, passing through the point P. Raises ConstructionError if the distance between <self> and the point P is lower or equal to Resolution from gp because there is an infinity of solutions in 3D space.
Parameters: P (gp_Pnt) – Return type: gp_Lin

Position
()¶  Returns the axis placement one axis whith the same location and direction as <self>.
Return type: gp_Ax1

Reversed
()¶  Reverses the direction of the line. Note:  Reverse assigns the result to this line, while  Reversed creates a new one.
Return type: gp_Lin

Rotated
()¶  Rotates a line. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales a line. S is the scaling value. The ‘Location’ point (origin) of the line is modified. The ‘Direction’ is reversed if the scale is negative.
Parameters: Return type:

SetLocation
()¶  Changes the location point (origin) of the line.
Parameters: P (gp_Pnt) – Return type: None

SetPosition
()¶  Complete redefinition of the line. The ‘Location’ point of <A1> is the origin of the line. The ‘Direction’ of <A1> is the direction of the line.
Parameters: A1 (gp_Ax1) – Return type: None

SquareDistance
()¶  Computes the square distance between <self> and the point P.
Parameters: P (gp_Pnt) – Return type: float  Computes the square distance between two lines.
Parameters: Other (gp_Lin) – Return type: float

Transformed
()¶  Transforms a line with the transformation T from class Trsf.
Parameters: T (gp_Trsf) – Return type: gp_Lin

Translated
()¶  Translates a line in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec) – Return type: gp_Lin  Translates a line from the point P1 to the point P2.
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Lin2d
(*args)¶ Bases:
object
 Creates a Line corresponding to X axis of the reference coordinate system.
Return type: None  Creates a line located with A.
Parameters: A (gp_Ax2d) – Return type: None  <P> is the location point (origin) of the line and <V> is the direction of the line.
Parameters: Return type:  Creates the line from the equation A*X + B*Y + C = 0.0 Raises ConstructionError if Sqrt(A*A + B*B) <= Resolution from gp. Raised if Sqrt(A*A + B*B) <= Resolution from gp.
Parameters: Return type: 
Angle
()¶  Computes the angle between two lines in radians.
Parameters: Other (gp_Lin2d) – Return type: float

Coefficients
()¶  Returns the normalized coefficients of the line : A * X + B * Y + C = 0.
Parameters:  A (float &) –
 B (float &) –
 C (float &) –
Return type:

Contains
()¶  Returns true if this line contains the point P, that is, if the distance between point P and this line is less than or equal to LinearTolerance.
Parameters: Return type:

Distance
()¶  Computes the distance between <self> and the point <P>.
Parameters: P (gp_Pnt2d) – Return type: float  Computes the distance between two lines.
Parameters: Other (gp_Lin2d) – Return type: float

Mirrored
()¶  Performs the symmetrical transformation of a line with respect to the point <P> which is the center of the symmetry
Parameters: P (gp_Pnt2d) – Return type: gp_Lin2d  Performs the symmetrical transformation of a line with respect to an axis placement which is the axis of the symmetry.
Parameters: A (gp_Ax2d) – Return type: gp_Lin2d

Normal
()¶  Computes the line normal to the direction of <self>, passing through the point <P>.
Parameters: P (gp_Pnt2d) – Return type: gp_Lin2d

Position
()¶  Returns the axis placement one axis whith the same location and direction as <self>.
Return type: gp_Ax2d

Reversed
()¶  Reverses the positioning axis of this line. Note:  Reverse assigns the result to this line, while  Reversed creates a new one.
Return type: gp_Lin2d

Rotated
()¶  Rotates a line. P is the center of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales a line. S is the scaling value. Only the origin of the line is modified.
Parameters: Return type:

SetPosition
()¶  Complete redefinition of the line. The ‘Location’ point of <A> is the origin of the line. The ‘Direction’ of <A> is the direction of the line.
Parameters: A (gp_Ax2d) – Return type: None

SquareDistance
()¶  Computes the square distance between <self> and the point <P>.
Parameters: P (gp_Pnt2d) – Return type: float  Computes the square distance between two lines.
Parameters: Other (gp_Lin2d) – Return type: float

Transformed
()¶  Transforms a line with the transformation T from class Trsf2d.
Parameters: T (gp_Trsf2d) – Return type: gp_Lin2d

Translate
()¶ Parameters: Return type: Return type:

Translated
()¶  Translates a line in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec2d) – Return type: gp_Lin2d  Translates a line from the point P1 to the point P2.
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Mat
(*args)¶ Bases:
object
 creates a matrix with null coefficients.
Return type: Parameters: Return type:  Creates a matrix. Col1, Col2, Col3 are the 3 columns of the matrix.
Parameters: Return type: 
Added
()¶  Computes the sum of this matrix and the matrix Other for each coefficient of the matrix : <self>.Coef(i,j) + <Other>.Coef(i,j)
Parameters: Other (gp_Mat) – Return type: gp_Mat

ChangeValue
()¶  Returns the coefficient of range (Row, Col) Raises OutOfRange if Row < 1 or Row > 3 or Col < 1 or Col > 3
Parameters: Return type:

Column
()¶  Returns the column of Col index. Raises OutOfRange if Col < 1 or Col > 3
Parameters: Col (int) – Return type: gp_XYZ

Divided
()¶  Divides all the coefficients of the matrix by Scalar
Parameters: Scalar (float) – Return type: gp_Mat

Inverted
()¶  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.
Return type: gp_Mat

IsSingular
()¶  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.
Return type: bool

Multiplied
()¶  Computes the product of two matrices <self> * <Other>
Parameters: Return type: Return type:

Multiply
()¶  Computes the product of two matrices <self> = <Other> * <self>.
Parameters: Other (gp_Mat) – Return type: None  Multiplies all the coefficients of the matrix by Scalar
Parameters: Scalar (float) – Return type: None

Powered
()¶  Computes <self> = <self> * <self> * .......* <self>, N time. if N = 0 <self> = Identity if N < 0 <self> = <self>.Invert() ........... <self>.Invert(). If N < 0 an exception will be raised if the matrix is not inversible
Parameters: N (int) – Return type: gp_Mat

Row
()¶  returns the row of Row index. Raises OutOfRange if Row < 1 or Row > 3
Parameters: Row (int) – Return type: gp_XYZ

SetCol
()¶  Assigns the three coordinates of Value to the column of index Col of this matrix. Raises OutOfRange if Col < 1 or Col > 3.
Parameters: Return type:

SetCols
()¶  Assigns the number triples Col1, Col2, Col3 to the three columns of this matrix.
Parameters: Return type:

SetCross
()¶  Modifies the matrix M so that applying it to any number triple (X, Y, Z) produces the same result as the cross product of Ref and the number triple (X, Y, Z): i.e.: M * {X,Y,Z}t = Ref.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 Ref and the triplet {XYZ}. Note: this matrix is antisymmetric.
Parameters: Ref (gp_XYZ) – Return type: None

SetDiagonal
()¶  Modifies the main diagonal of the matrix. <self>.Value (1, 1) = X1 <self>.Value (2, 2) = X2 <self>.Value (3, 3) = X3 The other coefficients of the matrix are not modified.
Parameters: Return type:

SetDot
()¶  Modifies this matrix so that applying it to any number triple (X, Y, Z) produces the same result as the scalar product of Ref and the number triple (X, Y, Z): this * (X,Y,Z) = Ref.(X,Y,Z) Note: this matrix is symmetric.
Parameters: Ref (gp_XYZ) – Return type: None

SetRotation
()¶  Modifies this matrix so that it represents a rotation. Ang is the angular value in radians and the XYZ axis gives the direction of the rotation. Raises ConstructionError if XYZ.Modulus() <= Resolution()
Parameters: Return type:

SetRow
()¶  Assigns the three coordinates of Value to the row of index Row of this matrix. Raises OutOfRange if Row < 1 or Row > 3.
Parameters: Return type:

SetRows
()¶  Assigns the number triples Row1, Row2, Row3 to the three rows of this matrix.
Parameters: Return type:

SetScale
()¶  Modifies the the matrix so that it represents a scaling transformation, where S is the scale factor. :  S 0.0 0.0  <self> =  0.0 S 0.0   0.0 0.0 S 
Parameters: S (float) – Return type: None

SetValue
()¶  Assigns <Value> to the coefficient of row Row, column Col of this matrix. Raises OutOfRange if Row < 1 or Row > 3 or Col < 1 or Col > 3
Parameters: Return type:

Subtracted
()¶  cOmputes for each coefficient of the matrix : <self>.Coef(i,j)  <Other>.Coef(i,j)
Parameters: Other (gp_Mat) – Return type: gp_Mat

Value
()¶  Returns the coefficient of range (Row, Col) Raises OutOfRange if Row < 1 or Row > 3 or Col < 1 or Col > 3
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Mat2d
(*args)¶ Bases:
object
 Creates a matrix with null coefficients.
Return type: None  Col1, Col2 are the 2 columns of the matrix.
Parameters: Return type: 
Added
()¶  Computes the sum of this matrix and the matrix Other.for each coefficient of the matrix : <self>.Coef(i,j) + <Other>.Coef(i,j) Note:  operator += assigns the result to this matrix, while  operator + creates a new one.
Parameters: Other (gp_Mat2d) – Return type: gp_Mat2d

ChangeValue
()¶  Returns the coefficient of range (Row, Col) Raises OutOfRange if Row < 1 or Row > 2 or Col < 1 or Col > 2
Parameters: Return type:

Column
()¶  Returns the column of Col index. Raises OutOfRange if Col < 1 or Col > 2
Parameters: Col (int) – Return type: gp_XY

Divided
()¶  Divides all the coefficients of the matrix by a scalar.
Parameters: Scalar (float) – Return type: gp_Mat2d

Inverted
()¶  Inverses the matrix and raises exception if the matrix is singular.
Return type: gp_Mat2d

IsSingular
()¶  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.
Return type: bool

Multiplied
()¶ Parameters: Return type: Return type:

Multiply
()¶  Computes the product of two matrices <self> * <Other>
Parameters: Other (gp_Mat2d) – Return type: None  Multiplies all the coefficients of the matrix by a scalar.
Parameters: Scalar (float) – Return type: None

Powered
()¶  computes <self> = <self> * <self> * .......* <self>, N time. if N = 0 <self> = Identity if N < 0 <self> = <self>.Invert() ........... <self>.Invert(). If N < 0 an exception can be raised if the matrix is not inversible
Parameters: N (int) – Return type: gp_Mat2d

PreMultiply
()¶  Modifies this matrix by premultiplying it by the matrix Other <self> = Other * <self>.
Parameters: Other (gp_Mat2d) – Return type: None

Row
()¶  Returns the row of index Row. Raised if Row < 1 or Row > 2
Parameters: Row (int) – Return type: gp_XY

SetCol
()¶  Assigns the two coordinates of Value to the column of range Col of this matrix Raises OutOfRange if Col < 1 or Col > 2.
Parameters: Return type:

SetCols
()¶  Assigns the number pairs Col1, Col2 to the two columns of this matrix
Parameters: Return type:

SetDiagonal
()¶  Modifies the main diagonal of the matrix. <self>.Value (1, 1) = X1 <self>.Value (2, 2) = X2 The other coefficients of the matrix are not modified.
Parameters: Return type:

SetRotation
()¶  Modifies this matrix, so that it representso a rotation. Ang is the angular value in radian of the rotation.
Parameters: Ang (float) – Return type: None

SetRow
()¶  Assigns the two coordinates of Value to the row of index Row of this matrix. Raises OutOfRange if Row < 1 or Row > 2.
Parameters: Return type:

SetRows
()¶  Assigns the number pairs Row1, Row2 to the two rows of this matrix.
Parameters: Return type:

SetScale
()¶  Modifies the matrix such that it represents a scaling transformation, where S is the scale factor :  S 0.0  <self> =  0.0 S 
Parameters: S (float) – Return type: None

SetValue
()¶  Assigns <Value> to the coefficient of row Row, column Col of this matrix. Raises OutOfRange if Row < 1 or Row > 2 or Col < 1 or Col > 2
Parameters: Return type:

Subtracted
()¶  Computes for each coefficient of the matrix : <self>.Coef(i,j)  <Other>.Coef(i,j)
Parameters: Other (gp_Mat2d) – Return type: gp_Mat2d

Value
()¶  Returns the coefficient of range (Row, Col) Raises OutOfRange if Row < 1 or Row > 2 or Col < 1 or Col > 2
Parameters: Return type:

thisown
¶ The membership flag

gp_OX
(*args)¶  Identifies an axis where its origin is Origin and its unit vector coordinates X = 1.0, Y = Z = 0.0
Return type: gp_Ax1

gp_OX2d
(*args)¶  Identifies an axis where its origin is Origin2d and its unit vector coordinates are: X = 1.0, Y = 0.0
Return type: gp_Ax2d

gp_OY
(*args)¶  Identifies an axis where its origin is Origin and its unit vector coordinates Y = 1.0, X = Z = 0.0
Return type: gp_Ax1

gp_OY2d
(*args)¶  Identifies an axis where its origin is Origin2d and its unit vector coordinates are Y = 1.0, X = 0.0
Return type: gp_Ax2d

gp_OZ
(*args)¶  Identifies an axis where its origin is Origin and its unit vector coordinates Z = 1.0, Y = X = 0.0
Return type: gp_Ax1

gp_Origin
(*args)¶  Identifies a Cartesian point with coordinates X = Y = Z = 0.0.0
Return type: gp_Pnt

class
gp_Parab
(*args)¶ Bases:
object
 Creates an indefinite Parabola.
Return type: None  Creates a parabola with its local coordinate system ‘A2’ and it’s focal length ‘Focal’. The XDirection of A2 defines the axis of symmetry of the parabola. The YDirection of A2 is parallel to the directrix of the parabola. The Location point of A2 is the vertex of the parabola Raises ConstructionError if Focal < 0.0 Raised if Focal < 0.0
Parameters: Return type:  D is the directrix of the parabola and F the focus point. The symmetry axis (XAxis) of the parabola is normal to the directrix and pass through the focus point F, but its location point is the vertex of the parabola. The YAxis of the parabola is parallel to D 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: Return type: 
Axis
()¶  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.
Return type: gp_Ax1

Directrix
()¶  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_Ax1 object), the origin of which is situated on the ‘X Axis’ of this parabola.
Return type: gp_Ax1

Location
()¶  Returns the vertex of the parabola. It is the ‘Location’ point of the coordinate system of the parabola.
Return type: gp_Pnt

Mirror
()¶ Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of a parabola with respect to the point P which is the center of the symmetry.
Parameters: P (gp_Pnt) – Return type: gp_Parab  Performs the symmetrical transformation of a parabola with respect to an axis placement which is the axis of the symmetry.
Parameters: A1 (gp_Ax1) – Return type: gp_Parab  Performs the symmetrical transformation of a parabola with respect to a plane. The axis placement A2 locates the plane of the symmetry (Location, XDirection, YDirection).
Parameters: A2 (gp_Ax2) – Return type: gp_Parab

Parameter
()¶  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.
Return type: float

Rotated
()¶  Rotates a parabola. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales a parabola. S is the scaling value. If S is negative the direction of the symmetry axis XAxis is reversed and the direction of the YAxis too.
Parameters: Return type:

SetAxis
()¶  Modifies this parabola by redefining its local coordinate system so that  its origin and ‘main Direction’ become those of the axis A1 (the ‘X Direction’ and ‘Y Direction’ are then recomputed in the same way as for any gp_Ax2) Raises ConstructionError if the direction of A1 is parallel to the previous XAxis of the parabola.
Parameters: A1 (gp_Ax1) – Return type: None

SetFocal
()¶  Changes the focal distance of the parabola. Raises ConstructionError if Focal < 0.0
Parameters: Focal (float) – Return type: None

SetLocation
()¶  Changes the location of the parabola. It is the vertex of the parabola.
Parameters: P (gp_Pnt) – Return type: None

SetPosition
()¶  Changes the local coordinate system of the parabola.
Parameters: A2 (gp_Ax2) – Return type: None

Transformed
()¶  Transforms a parabola with the transformation T from class Trsf.
Parameters: T (gp_Trsf) – Return type: gp_Parab

Translated
()¶  Translates a parabola in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec) – Return type: gp_Parab  Translates a parabola from the point P1 to the point P2.
Parameters: Return type:

XAxis
()¶  Returns the symmetry axis of the parabola. The location point of the axis is the vertex of the parabola.
Return type: gp_Ax1

YAxis
()¶  It is an axis parallel to the directrix of the parabola. The location point of this axis is the vertex of the parabola.
Return type: gp_Ax1

thisown
¶ The membership flag

class
gp_Parab2d
(*args)¶ Bases:
object
 Creates an indefinite parabola.
Return type: None  Creates a parabola with its vertex point, its axis of symmetry (‘XAxis’) and its focal length. The sense of parametrization is given by Sense. Warnings : It is possible to have Focal = 0. Raises ConstructionError if Focal < 0.0
Parameters: Return type:  Creates a parabola with its vertex point, its axis of symmetry (‘XAxis’) and its focal length. The sense of parametrization is given by A. Warnings : It is possible to have Focal = 0. Raises ConstructionError if Focal < 0.0
Parameters: Return type:  Creates a parabola with the directrix and the focus point. The sense of parametrization is given by Sense.
Parameters: Return type:  Creates a parabola with the directrix and the focus point. The Sense of parametrization is given by D.
Parameters: Return type: 
Axis
()¶  Returns the local coordinate system of the parabola. The ‘Location’ point of this axis is the vertex of the parabola.
Return type: gp_Ax22d

Coefficients
()¶  Computes the coefficients of the implicit equation of the parabola. A * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.
Parameters:  A (float &) –
 B (float &) –
 C (float &) –
 D (float &) –
 E (float &) –
 F (float &) –
Return type:

Directrix
()¶  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_Ax2d object), the origin of which is situated on the ‘X Axis’ of this parabola.
Return type: gp_Ax2d

IsDirect
()¶  Returns true if the local coordinate system is direct and false in the other case.
Return type: bool

MirrorAxis
()¶  Returns the symmetry axis of the parabola. The ‘Location’ point of this axis is the vertex of the parabola.
Return type: gp_Ax2d

Mirrored
()¶  Performs the symmetrical transformation of a parabola with respect to the point P which is the center of the symmetry
Parameters: P (gp_Pnt2d) – Return type: gp_Parab2d  Performs the symmetrical transformation of a parabola with respect to an axis placement which is the axis of the symmetry.
Parameters: A (gp_Ax2d) – Return type: gp_Parab2d

Parameter
()¶  Returns the distance between the focus and the directrix of the parabola.
Return type: float

Reversed
()¶  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.
Return type: gp_Parab2d

Rotated
()¶  Rotates a parabola. P is the center of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales a parabola. S is the scaling value. If S is negative the direction of the symmetry axis ‘XAxis’ is reversed and the direction of the ‘YAxis’ too.
Parameters: Return type:

SetAxis
()¶  Changes the local coordinate system of the parabola. The ‘Location’ point of A becomes the vertex of the parabola.
Parameters: A (gp_Ax22d) – Return type: None

SetFocal
()¶  Changes the focal distance of the parabola Warnings : It is possible to have Focal = 0. Raises ConstructionError if Focal < 0.0
Parameters: Focal (float) – Return type: None

SetLocation
()¶  Changes the ‘Location’ point of the parabola. It is the vertex of the parabola.
Parameters: P (gp_Pnt2d) – Return type: None

SetMirrorAxis
()¶  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: A (gp_Ax2d) – Return type: None

Transformed
()¶  Transforms an parabola with the transformation T from class Trsf2d.
Parameters: T (gp_Trsf2d) – Return type: gp_Parab2d

Translate
()¶ Parameters: Return type: Return type:

Translated
()¶  Translates a parabola in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec2d) – Return type: gp_Parab2d  Translates a parabola from the point P1 to the point P2.
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Pln
(*args)¶ Bases:
object
 Creates a plane coincident with OXY plane of the reference coordinate system.
Return type: None  The coordinate system of the plane is defined with the axis placement A3. The ‘Direction’ of A3 defines the normal to the plane. The ‘Location’ of A3 defines the location (origin) of the plane. The ‘XDirection’ and ‘YDirection’ of A3 define the ‘XAxis’ and the ‘YAxis’ of the plane used to parametrize the plane.
Parameters: A3 (gp_Ax3) – Return type: None  Creates a plane with the ‘Location’ point <P> and the normal direction <V>.
Parameters: Return type:  Creates a plane from its cartesian equation : A * X + B * Y + C * Z + D = 0.0 Raises ConstructionError if Sqrt (A*A + B*B + C*C) <= Resolution from gp.
Parameters: Return type: 
Coefficients
()¶  Returns the coefficients of the plane’s cartesian equation : A * X + B * Y + C * Z + D = 0.
Parameters:  A (float &) –
 B (float &) –
 C (float &) –
 D (float &) –
Return type:

Contains
()¶  Returns true if this plane contains the point P. This means that  the distance between point P and this plane is less than or equal to LinearTolerance, 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 LinearTolerance.
Parameters: Return type:  Returns true if this plane contains the line L. This means that  the distance between point P and this plane is less than or equal to LinearTolerance, 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 LinearTolerance.
Parameters: Return type:

Distance
()¶  Computes the distance between <self> and the point <P>.
Parameters: P (gp_Pnt) – Return type: float  Computes the distance between <self> and the line <L>.
Parameters: L (gp_Lin) – Return type: float  Computes the distance between two planes.
Parameters: Other (gp_Pln) – Return type: float

Mirror
()¶ Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of a plane with respect to the point <P> 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: P (gp_Pnt) – Return type: gp_Pln  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: A1 (gp_Ax1) – Return type: gp_Pln  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: A2 (gp_Ax2) – Return type: gp_Pln

Rotated
()¶  rotates a plane. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales a plane. S is the scaling value.
Parameters: Return type:

SetAxis
()¶  Modifies this plane, by redefining its local coordinate system so that  its origin and ‘main Direction’ become those of the axis A1 (the ‘X Direction’ and ‘Y Direction’ are then recomputed). Raises ConstructionError if the A1 is parallel to the ‘XAxis’ of the plane.
Parameters: A1 (gp_Ax1) – Return type: None

SetPosition
()¶  Changes the local coordinate system of the plane.
Parameters: A3 (gp_Ax3) – Return type: None

SquareDistance
()¶  Computes the square distance between <self> and the point <P>.
Parameters: P (gp_Pnt) – Return type: float  Computes the square distance between <self> and the line <L>.
Parameters: L (gp_Lin) – Return type: float  Computes the square distance between two planes.
Parameters: Other (gp_Pln) – Return type: float

Transformed
()¶  Transforms a plane with the transformation T 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: T (gp_Trsf) – Return type: gp_Pln

Translated
()¶  Translates a plane in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec) – Return type: gp_Pln  Translates a plane from the point P1 to the point P2.
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Pnt
(*args)¶ Bases:
object
 Creates a point with zero coordinates.
Return type: None  Creates a point from a XYZ object.
Parameters: Coord (gp_XYZ) – Return type: None  Creates a point with its 3 cartesian’s coordinates : Xp, Yp, Zp.
Parameters: Return type: 
BaryCenter
()¶  Assigns the result of the following expression to this point (Alpha*this + Beta*P) / (Alpha + Beta)
Parameters: Return type:

ChangeCoord
()¶  Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.
Return type: gp_XYZ

Coord
()¶  Returns the coordinate of corresponding to the value of Index : Index = 1 => X is returned Index = 2 => Y is returned Index = 3 => Z is returned Raises OutOfRange if Index != {1, 2, 3}. Raised if Index != {1, 2, 3}.
Parameters: Index (int) – Return type: float  For this point gives its three coordinates Xp, Yp and Zp.
Parameters:  Xp (float &) –
 Yp (float &) –
 Zp (float &) –
Return type:  For this point, returns its three coordinates as a XYZ object.
Return type: gp_XYZ

IsEqual
()¶  Comparison Returns True if the distance between the two points is lower or equal to LinearTolerance.
Parameters: Return type:

Mirror
()¶  Performs the symmetrical transformation of a point with respect to the point P which is the center of the symmetry.
Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of a point with respect to an axis placement which is the axis of the symmetry.
Parameters: P (gp_Pnt) – Return type: gp_Pnt  Performs the symmetrical transformation of a point with respect to a plane. The axis placement A2 locates the plane of the symmetry : (Location, XDirection, YDirection).
Parameters: A1 (gp_Ax1) – Return type: gp_Pnt  Rotates a point. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: A2 (gp_Ax2) – Return type: gp_Pnt

Rotated
()¶  Scales a point. S is the scaling value.
Parameters: Return type:

Scaled
()¶  Transforms a point with the transformation T.
Parameters: Return type:

SetCoord
()¶  Changes the coordinate of range Index : Index = 1 => X is modified Index = 2 => Y is modified Index = 3 => Z is modified Raised if Index != {1, 2, 3}.
Parameters: Return type:  For this point, assigns the values Xp, Yp and Zp to its three coordinates.
Parameters: Return type:

SetX
()¶  Assigns the given value to the X coordinate of this point.
Parameters: X (float) – Return type: None

SetXYZ
()¶  Assigns the three coordinates of Coord to this point.
Parameters: Coord (gp_XYZ) – Return type: None

SetY
()¶  Assigns the given value to the Y coordinate of this point.
Parameters: Y (float) – Return type: None

SetZ
()¶  Assigns the given value to the Z coordinate of this point.
Parameters: Z (float) – Return type: None

SquareDistance
()¶  Computes the square distance between two points.
Parameters: Other (gp_Pnt) – Return type: float

Transformed
()¶  Translates a point in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: T (gp_Trsf) – Return type: gp_Pnt

Translated
()¶  Translates a point from the point P1 to the point P2.
Parameters: Return type: Return type:

thisown
¶ The membership flag

class
gp_Pnt2d
(*args)¶ Bases:
object
 Creates a point with zero coordinates.
Return type: None  Creates a point with a doublet of coordinates.
Parameters: Coord (gp_XY) – Return type: None  Creates a point with its 2 cartesian’s coordinates : Xp, Yp.
Parameters: Return type: 
ChangeCoord
()¶  Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.
Return type: gp_XY

Coord
()¶  Returns the coordinate of range Index : Index = 1 => X is returned Index = 2 => Y is returned Raises OutOfRange if Index != {1, 2}.
Parameters: Index (int) – Return type: float  For this point returns its two coordinates as a number pair.
Parameters:  Xp (float &) –
 Yp (float &) –
Return type:  For this point, returns its two coordinates as a number pair.
Return type: gp_XY

Distance
()¶  Computes the distance between two points.
Parameters: Other (gp_Pnt2d) – Return type: float

IsEqual
()¶  Comparison Returns True if the distance between the two points is lower or equal to LinearTolerance.
Parameters: Return type:

Mirror
()¶  Performs the symmetrical transformation of a point with respect to the point P which is the center of the symmetry.
Parameters: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of a point with respect to an axis placement which is the axis
Parameters: P (gp_Pnt2d) – Return type: gp_Pnt2d  Rotates a point. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: A (gp_Ax2d) – Return type: gp_Pnt2d

Rotated
()¶  Scales a point. S is the scaling value.
Parameters: Return type:

Scaled
()¶  Transforms a point with the transformation T.
Parameters: Return type:

SetCoord
()¶  Assigns the value Xi to the coordinate that corresponds to Index: Index = 1 => X is modified Index = 2 => Y is modified Raises OutOfRange if Index != {1, 2}.
Parameters: Return type:  For this point, assigns the values Xp and Yp to its two coordinates
Parameters: Return type:

SetX
()¶  Assigns the given value to the X coordinate of this point.
Parameters: X (float) – Return type: None

SetXY
()¶  Assigns the two coordinates of Coord to this point.
Parameters: Coord (gp_XY) – Return type: None

SetY
()¶  Assigns the given value to the Y coordinate of this point.
Parameters: Y (float) – Return type: None

SquareDistance
()¶  Computes the square distance between two points.
Parameters: Other (gp_Pnt2d) – Return type: float

Transformed
()¶  Translates a point in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: T (gp_Trsf2d) – Return type: gp_Pnt2d

Translate
()¶ Parameters: Return type: Return type:

Translated
()¶  Translates a point from the point P1 to the point P2.
Parameters: Return type: Return type:

thisown
¶ The membership flag

class
gp_Quaternion
(*args)¶ Bases:
object
 Creates an identity quaternion
Return type: None  Creates quaternion directly from component values
Parameters: Return type:  Creates copy of another quaternion
Parameters: theToCopy (gp_Quaternion) – Return type: None  Creates quaternion representing shortestarc rotation operator producing vector theVecTo from vector theVecFrom.
Parameters: Return type:  Creates quaternion representing shortestarc 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: Return type:  Creates quaternion representing rotation on angle theAngle around vector theAxis
Parameters: Return type:  Creates quaternion from rotation matrix 3*3 (which should be orthonormal skewsymmetric matrix)
Parameters: theMat (gp_Mat) – Return type: None 
Add
()¶  Adds componnets of other quaternion; result is ‘rotations mix’
Parameters: theOther (gp_Quaternion) – Return type: None

Added
()¶  Makes sum of quaternion components; result is ‘rotations mix’
Parameters: theOther (gp_Quaternion) – Return type: gp_Quaternion

Dot
()¶  Computes inner product / scalar product / Dot
Parameters: theOther (gp_Quaternion) – Return type: float

GetEulerAngles
()¶  Returns Euler angles describing current rotation
Parameters:  theOrder (gp_EulerSequence) –
 theAlpha (float &) –
 theBeta (float &) –
 theGamma (float &) –
Return type:

GetVectorAndAngle
()¶  Convert a quaternion to Axis+Angle representation, preserve the axis direction and angle from PI to +PI
Parameters:  theAxis (gp_Vec) –
 theAngle (float &) –
Return type:

Inverted
()¶  Return inversed quaternion q^1
Return type: gp_Quaternion

IsEqual
()¶  Simple equal test without precision
Parameters: theOther (gp_Quaternion) – Return type: bool

Multiplied
()¶  Multiply function  work the same as Matrices multiplying. qq’ = (cross(v,v’) + wv’ + w’v, ww’  dot(v,v’)) Result is rotation combination: q’ than q (here q=this, q’=theQ). Notices than: qq’ != q’q; qq^1 = q;
Parameters: theOther (gp_Quaternion) – Return type: gp_Quaternion

Multiply
()¶  Adds rotation by multiplication
Parameters: theOther (gp_Quaternion) – Return type: None  Rotates vector by quaternion as rotation operator
Parameters: theVec (gp_Vec) – Return type: gp_Vec

Negated
()¶  Returns quaternion with all components negated. Note that this operation does not affect neither rotation operator defined by quaternion nor its norm.
Return type: gp_Quaternion

Normalize
()¶  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
Return type: None

Normalized
()¶  Returns quaternion scaled so that its norm goes to 1.
Return type: gp_Quaternion

Reversed
()¶  Return rotation with reversed direction (conjugated quaternion)
Return type: gp_Quaternion

Scale
()¶  Scale all components by quaternion by theScale; note that rotation is not changed by this operation (except 0scaling)
Parameters: theScale (float) – Return type: None

Scaled
()¶  Returns scaled quaternion
Parameters: theScale (float) – Return type: gp_Quaternion

Set
()¶ Parameters:  x (float) –
 y (float) –
 z (float) –
 w (float) –
 theQuaternion (gp_Quaternion) –
Return type: Return type:

SetEulerAngles
()¶  Create a unit quaternion representing rotation defined by generalized Euler angles
Parameters: Return type:

SetMatrix
()¶  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 one
Parameters: theMat (gp_Mat) – Return type: None

SetRotation
()¶  Sets quaternion to shortestarc 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: Return type:  Sets quaternion to shortestarc rotation producing vector theVecTo from vector theVecFrom. If vectors theVecFrom and theVecTo are opposite then rotation axis is computed as theVecFrom ^ theHelpCrossVec.
Parameters: Return type:

SetVectorAndAngle
()¶  Create a unit quaternion from Axis+Angle representation
Parameters: Return type:

StabilizeLength
()¶  Stabilize quaternion length within 1  1/4. This operation is a lot faster than normalization and preserve length goes to 0 or infinity
Return type: None

Subtract
()¶  Subtracts componnets of other quaternion; result is ‘rotations mix’
Parameters: theOther (gp_Quaternion) – Return type: None

Subtracted
()¶  Makes difference of quaternion components; result is ‘rotations mix’
Parameters: theOther (gp_Quaternion) – Return type: gp_Quaternion

thisown
¶ The membership flag

class
gp_QuaternionNLerp
(*args)¶ Bases:
object
Return type: Parameters:  theQStart (gp_Quaternion) –
 theQEnd (gp_Quaternion) –
Return type: 
Init
()¶ Parameters:  theQStart (gp_Quaternion) –
 theQEnd (gp_Quaternion) –
Return type:

InitFromUnit
()¶ Parameters:  theQStart (gp_Quaternion) –
 theQEnd (gp_Quaternion) –
Return type:

static
Interpolate
(*args)¶  Set interpolated quaternion for theT position (from 0.0 to 1.0)
Parameters:  theT (float) –
 theResultQ (gp_Quaternion) –
 theQStart (gp_Quaternion) –
 theQEnd (gp_Quaternion) –
 theT –
Return type: Return type:

thisown
¶ The membership flag

gp_QuaternionNLerp_Interpolate
(*args)¶  Set interpolated quaternion for theT position (from 0.0 to 1.0)
Parameters:  theT (float) –
 theResultQ (gp_Quaternion) –
 theQStart (gp_Quaternion) –
 theQEnd (gp_Quaternion) –
 theT –
Return type: Return type:

class
gp_QuaternionSLerp
(*args)¶ Bases:
object
Return type: Parameters:  theQStart (gp_Quaternion) –
 theQEnd (gp_Quaternion) –
Return type: 
Init
()¶ Parameters:  theQStart (gp_Quaternion) –
 theQEnd (gp_Quaternion) –
Return type:

InitFromUnit
()¶ Parameters:  theQStart (gp_Quaternion) –
 theQEnd (gp_Quaternion) –
Return type:

Interpolate
()¶  Set interpolated quaternion for theT position (from 0.0 to 1.0)
Parameters:  theT (float) –
 theResultQ (gp_Quaternion) –
Return type:

thisown
¶ The membership flag

gp_Resolution
(*args)¶  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 as gp::Resolution().
Return type: float

class
gp_Sphere
(*args)¶ Bases:
object
 Creates an indefinite sphere.
Return type: None  Constructs a sphere with radius Radius, centered on the origin of A3. A3 is the local coordinate system of the sphere. Warnings : It is not forbidden to create a sphere with null radius. Raises ConstructionError if Radius < 0.0
Parameters: Return type: 
Coefficients
()¶  Computes the coefficients of the implicit equation of the quadric in the absolute cartesian coordinates system : A1.X**2 + A2.Y**2 + A3.Z**2 + 2.(B1.X.Y + B2.X.Z + B3.Y.Z) + 2.(C1.X + C2.Y + C3.Z) + D = 0.0
Parameters:  A1 (float &) –
 A2 (float &) –
 A3 (float &) –
 B1 (float &) –
 B2 (float &) –
 B3 (float &) –
 C1 (float &) –
 C2 (float &) –
 C3 (float &) –
 D (float &) –
Return type:

Direct
()¶  Returns true if the local coordinate system of this sphere is righthanded.
Return type: bool

Mirror
()¶ Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of a sphere with respect to the point P which is the center of the symmetry.
Parameters: P (gp_Pnt) – Return type: gp_Sphere  Performs the symmetrical transformation of a sphere with respect to an axis placement which is the axis of the symmetry.
Parameters: A1 (gp_Ax1) – Return type: gp_Sphere  Performs the symmetrical transformation of a sphere with respect to a plane. The axis placement A2 locates the plane of the of the symmetry : (Location, XDirection, YDirection).
Parameters: A2 (gp_Ax2) – Return type: gp_Sphere

Rotated
()¶  Rotates a sphere. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales a sphere. S is the scaling value. The absolute value of S is used to scale the sphere
Parameters: Return type:

SetPosition
()¶  Changes the local coordinate system of the sphere.
Parameters: A3 (gp_Ax3) – Return type: None

SetRadius
()¶  Assigns R the radius of the Sphere. Warnings : It is not forbidden to create a sphere with null radius. Raises ConstructionError if R < 0.0
Parameters: R (float) – Return type: None

Transformed
()¶  Transforms a sphere with the transformation T from class Trsf.
Parameters: T (gp_Trsf) – Return type: gp_Sphere

Translated
()¶  Translates a sphere in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec) – Return type: gp_Sphere  Translates a sphere from the point P1 to the point P2.
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Torus
(*args)¶ Bases:
object
 creates an indefinite Torus.
Return type: None  a torus centered on the origin of coordinate system A3, with major radius MajorRadius and minor radius MinorRadius, and with the reference plane defined by the origin, the ‘X Direction’ and the ‘Y Direction’ of A3. Warnings : It is not forbidden to create a torus with MajorRadius = MinorRadius = 0.0 Raises ConstructionError if MinorRadius < 0.0 or if MajorRadius < 0.0
Parameters: Return type: 
Direct
()¶  returns true if the Ax3, the local coordinate system of this torus, is right handed.
Return type: bool

Mirror
()¶ Parameters: Return type: Return type: Return type:

Mirrored
()¶  Performs the symmetrical transformation of a torus with respect to the point P which is the center of the symmetry.
Parameters: P (gp_Pnt) – Return type: gp_Torus  Performs the symmetrical transformation of a torus with respect to an axis placement which is the axis of the symmetry.
Parameters: A1 (gp_Ax1) – Return type: gp_Torus  Performs the symmetrical transformation of a torus with respect to a plane. The axis placement A2 locates the plane of the of the symmetry : (Location, XDirection, YDirection).
Parameters: A2 (gp_Ax2) – Return type: gp_Torus

Rotated
()¶  Rotates a torus. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
Parameters: Return type:

Scaled
()¶  Scales a torus. S is the scaling value. The absolute value of S is used to scale the torus
Parameters: Return type:

SetAxis
()¶  Modifies this torus, by redefining its local coordinate system so that:  its origin and ‘main Direction’ become those of the axis A1 (the ‘X Direction’ and ‘Y Direction’ are then recomputed). Raises ConstructionError if the direction of A1 is parallel to the ‘XDirection’ of the coordinate system of the toroidal surface.
Parameters: A1 (gp_Ax1) – Return type: None

SetMajorRadius
()¶  Assigns value to the major radius of this torus. Raises ConstructionError if MajorRadius  MinorRadius <= Resolution()
Parameters: MajorRadius (float) – Return type: None

SetMinorRadius
()¶  Assigns value to the minor radius of this torus. Raises ConstructionError if MinorRadius < 0.0 or if MajorRadius  MinorRadius <= Resolution from gp.
Parameters: MinorRadius (float) – Return type: None

SetPosition
()¶  Changes the local coordinate system of the surface.
Parameters: A3 (gp_Ax3) – Return type: None

Transformed
()¶  Transforms a torus with the transformation T from class Trsf.
Parameters: T (gp_Trsf) – Return type: gp_Torus

Translated
()¶  Translates a torus in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
Parameters: V (gp_Vec) – Return type: gp_Torus  Translates a torus from the point P1 to the point P2.
Parameters: Return type:

thisown
¶ The membership flag

class
gp_Trsf
(*args)¶ Bases:
object
 Returns the identity transformation.
Return type: None  Creates a 3D transformation from the 2D transformation T. The resulting transformation has a homogeneous vectorial part, V3, and a translation part, T3, built from T: a11 a12 0 a13 V3 = a21 a22 0 T3 = a23 0 0 1. 0 It also has the same scale factor as T. This guarantees (by projection) that the transformation which would be performed by T 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: T (gp_Trsf2d) – Return type: None 
Form
()¶  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.
Return type: gp_TrsfForm

GetRotation
()¶  Returns the boolean True if there is nonzero 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:  theAxis (gp_XYZ) –
 theAngle (float &) –
Return type:  Returns quaternion representing rotational part of the transformation.
Return type: gp_Quaternion

HVectorialPart
()¶  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.
Return type: gp_Mat

Inverted
()¶  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 <self>. In a C++ implementation you can also write Tcomposed = <self> * T. Example : Trsf T1, T2, Tcomp; ............... Tcomp = T2.Multiplied(T1); // or (Tcomp = T2 * T1) Pnt P1(10.,3.,4.); Pnt P2 = P1.Transformed(Tcomp); //using Tcomp Pnt P3 = P1.Transformed(T1); //using T1 then T2 P3.Transform(T2); // P3 = P2 !!!
Return type: gp_Trsf

IsNegative
()¶  Returns true if the determinant of the vectorial part of this transformation is negative.
Return type: bool

Multiply
()¶  Computes the transformation composed with <self> and T. <self> = <self> * T
Parameters: T (gp_Trsf) – Return type: None

Powered
()¶  Computes the following composition of transformations <self> * <self> * .......* <self>, N time. if N = 0 <self> = Identity if N < 0 <self> = <self>.Inverse() ........... <self>.Inverse(). //! Raises if N < 0 and if the matrix of the transformation not inversible.
Parameters: N (int) – Return type: gp_Trsf

PreMultiply
()¶  Computes the transformation composed with <self> and T. <self> = T * <self>
Parameters: T (gp_Trsf) – Return type: None

SetDisplacement
()¶  Modifies this transformation so that it transforms the coordinate system defined by FromSystem1 into the one defined by ToSystem2. After this modification, this transformation transforms:  the origin of FromSystem1 into the origin of ToSystem2,  the ‘X Direction’ of FromSystem1 into the ‘X Direction’ of ToSystem2,  the ‘Y Direction’ of FromSystem1 into the ‘Y Direction’ of ToSystem2, and  the ‘main Direction’ of FromSystem1 into the ‘main Direction’ of ToSystem2. 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: Return type:

SetMirror
()¶  Makes the transformation into a symmetrical transformation. P is the center of the symmetry.
Parameters: P (gp_Pnt) – Return type: None  Makes the transformation into a symmetrical transformation. A1 is the center of the axial symmetry.
Parameters: A1 (gp_Ax1) – Return type: None  Makes the transformation into a symmetrical transformation. A2 is the center of the planar symmetry and defines the plane of symmetry by its origin, ‘X Direction’ and ‘Y Direction’.
Parameters: A2 (gp_Ax2) – Return type: None

SetRotation
()¶  Changes the transformation into a rotation. A1 is the rotation axis and Ang is the angular value of the rotation in radians.
Parameters: Return type:  Changes the transformation into a rotation defined by quaternion. Note that rotation is performed around origin, i.e. no translation is involved.
Parameters: R (gp_Quaternion) – Return type: None

SetScale
()¶  Changes the transformation into a scale. P is the center of the scale and S is the scaling value. Raises ConstructionError If <S> is null.
Parameters: Return type:

SetScaleFactor
()¶  Modifies the scale factor. Raises ConstructionError If S is null.
Parameters: S (float) – Return type: None

SetTransformation
()¶  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 ‘FromSystem1’ to the coordinate system ‘ToSystem2’. Example : In a C++ implementation : Real x1, y1, z1; // are the coordinates of a point in the // local system FromSystem1 Real x2, y2, z2; // are the coordinates of a point in the // local system ToSystem2 gp_Pnt P1 (x1, y1, z1) Trsf T; T.SetTransformation (FromSystem1, ToSystem2); gp_Pnt P2 = P1.Transformed (T); P2.Coord (x2, y2, z2);
Parameters: Return type:  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 {P(0.,0.,0.), VX (1.,0.,0.), VY (0.,1.,0.), VZ (0., 0. ,1.) } to the local coordinate system defined with the Ax3 ToSystem. Use in the same way as the previous method. FromSystem1 is defaulted to the absolute coordinate system.
Parameters: ToSystem (gp_Ax3) – Return type: None  Sets transformation by directly specified rotation and translation.
Parameters:  R (gp_Quaternion) –
 T (gp_Vec) –
Return type:

SetTranslation
()¶  Changes the transformation into a translation. V is the vector of the translation.
Parameters: V (gp_Vec) – Return type: None  Makes the transformation into a translation where the translation vector is the vector (P1, P2) defined from point P1 to point P2.
Parameters: Return type:

SetTranslationPart
()¶  Replaces the translation vector with the vector V.
Parameters: V (gp_Vec) – Return type: None

SetValues
()¶  Sets the coefficients of the transformation. The transformation of the point x,y,z is the point x’,y’,z’ with : //! x’ = a11 x + a12 y + a13 z + a14 y’ = a21 x + a22 y + a23 z + a24 z’ = a31 x + a32 y + a33 z + a34 //! 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: Return type:

Transforms
()¶ Parameters:  X (float &) –
 Y (float &) –
 Z (float &) –
Return type: