OCC.Core.gp module

gp module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_gp.html

class SwigPyIterator(*args, **kwargs)

Bases: object

advance()
copy()
decr()
distance()
equal()
incr()
next()
previous()
property thisown

The membership flag

value()
class gp

Bases: object

static DX()
  • Returns a unit vector with the combination (1,0,0)
    rtype

    gp_Dir

static DX2d()
  • Returns a unit vector with the combinations (1,0)
    rtype

    gp_Dir2d

static DY()
  • Returns a unit vector with the combination (0,1,0)
    rtype

    gp_Dir

static DY2d()
  • Returns a unit vector with the combinations (0,1)
    rtype

    gp_Dir2d

static DZ()
  • Returns a unit vector with the combination (0,0,1)
    rtype

    gp_Dir

static OX()
  • Identifies an axis where its origin is Origin and its unit vector coordinates X = 1.0, Y = Z = 0.0
    rtype

    gp_Ax1

static OX2d()
  • Identifies an axis where its origin is Origin2d and its unit vector coordinates are: X = 1.0, Y = 0.0
    rtype

    gp_Ax2d

static OY()
  • Identifies an axis where its origin is Origin and its unit vector coordinates Y = 1.0, X = Z = 0.0
    rtype

    gp_Ax1

static OY2d()
  • Identifies an axis where its origin is Origin2d and its unit vector coordinates are Y = 1.0, X = 0.0
    rtype

    gp_Ax2d

static OZ()
  • Identifies an axis where its origin is Origin and its unit vector coordinates Z = 1.0, Y = X = 0.0
    rtype

    gp_Ax1

static Origin()
  • Identifies a Cartesian point with coordinates X = Y = Z = 0.0.0
    rtype

    gp_Pnt

static Origin2d()
  • Identifies a Cartesian point with coordinates X = Y = 0.0
    rtype

    gp_Pnt2d

static Resolution()
  • 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().
    rtype

    float

static XOY()
  • 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
    rtype

    gp_Ax2

static YOZ()
  • 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
    rtype

    gp_Ax2

static ZOX()
  • 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
    rtype

    gp_Ax2

property thisown

The membership flag

class gp_Ax1(*args)

Bases: object

  • Creates an axis object representing Z axis of the reference co-ordinate system.
    rtype

    None* P is the location point and V is the direction of <self>.

    param P

    type P

    gp_Pnt

    param V

    type V

    gp_Dir

    rtype

    None

Angle()
  • Computes the angular value, in radians, between <self>.Direction() and <Other>.Direction(). Returns the angle between 0 and 2*PI radians.
    param Other

    type Other

    gp_Ax1

    rtype

    float

Direction()
  • Returns the direction of <self>.
    rtype

    gp_Dir

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.
    param Other

    type Other

    gp_Ax1

    param AngularTolerance

    type AngularTolerance

    float

    param LinearTolerance

    type LinearTolerance

    float

    rtype

    bool

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..
    param Other

    type Other

    gp_Ax1

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

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.
    param Other

    type Other

    gp_Ax1

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

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.
    param Other

    type Other

    gp_Ax1

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

Location()
  • Returns the location point of <self>.
    rtype

    gp_Pnt

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.
    param P

    type P

    gp_Pnt

    rtype

    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.

    param A1

    type A1

    gp_Ax1

    rtype

    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.

    param A2

    type A2

    gp_Ax2

    rtype

    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.
    param P

    type P

    gp_Pnt

    rtype

    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.

    param A1

    type A1

    gp_Ax1

    rtype

    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.

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Ax1

Reverse()
  • Reverses the unit vector of this axis. and assigns the result to this axis.
    rtype

    None

Reversed()
  • Reverses the unit vector of this axis and creates a new one.
    rtype

    gp_Ax1

Rotate()
  • Rotates this axis at an angle Ang (in radians) about the axis A1 and assigns the result to this axis.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    None

Rotated()
  • Rotates this axis at an angle Ang (in radians) about the axis A1 and creates a new one.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Ax1

Scale()
  • Applies a scaling transformation to this axis with: - scale factor S, and - center P and assigns the result to this axis.
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    None

Scaled()
  • Applies a scaling transformation to this axis with: - scale factor S, and - center P and creates a new axis.
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Ax1

SetDirection()
  • Assigns V as the ‘Direction’ of this axis.
    param V

    type V

    gp_Dir

    rtype

    None

SetLocation()
  • Assigns P as the origin of this axis.
    param P

    type P

    gp_Pnt

    rtype

    None

Transform()
  • Applies the transformation T to this axis. and assigns the result to this axis.
    param T

    type T

    gp_Trsf

    rtype

    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.
    param T

    type T

    gp_Trsf

    rtype

    gp_Ax1

Translate()
  • Translates this axis by the vector V, and assigns the result to this axis.
    param V

    type V

    gp_Vec

    rtype

    None* Translates this axis by: the vector (P1, P2) defined from point P1 to point P2. and assigns the result to this axis.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    None

Translated()
  • Translates this axis by the vector V, and creates a new one.
    param V

    type V

    gp_Vec

    rtype

    gp_Ax1* Translates this axis by: the vector (P1, P2) defined from point P1 to point P2. and creates a new one.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Ax1

property thisown

The membership flag

class gp_Ax2(*args)

Bases: object

  • Creates an object corresponding to the reference coordinate system (OXYZ).
    rtype

    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).

    param P

    type P

    gp_Pnt

    param N

    type N

    gp_Dir

    param Vx

    type Vx

    gp_Dir

    rtype

    None* Creates - a coordinate system with an origin P, where V gives the ‘main Direction’ (here, ‘X Direction’ and ‘Y Direction’ are defined automatically).

    param P

    type P

    gp_Pnt

    param V

    type V

    gp_Dir

    rtype

    None

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.
    param Other

    type Other

    gp_Ax2

    rtype

    float

Axis()
  • Returns the main axis of <self>. It is the ‘Location’ point and the main ‘Direction’.
    rtype

    gp_Ax1

Direction()
  • Returns the main direction of <self>.
    rtype

    gp_Dir

IsCoplanar()
Parameters

Other

type Other

gp_Ax2

param LinearTolerance

type LinearTolerance

float

param AngularTolerance

type AngularTolerance

float

rtype

bool* 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.

param A1

type A1

gp_Ax1

param LinearTolerance

type LinearTolerance

float

param AngularTolerance

type AngularTolerance

float

rtype

bool

Location()
  • Returns the ‘Location’ point (origin) of <self>.
    rtype

    gp_Pnt

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 right-handed property of the coordinate system.
    param P

    type P

    gp_Pnt

    rtype

    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 right-handed property of the coordinate system.

    param A1

    type A1

    gp_Ax1

    rtype

    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 right-handed property of the coordinate system.

    param A2

    type A2

    gp_Ax2

    rtype

    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 right-handed property of the coordinate system.
    param P

    type P

    gp_Pnt

    rtype

    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 right-handed property of the coordinate system.

    param A1

    type A1

    gp_Ax1

    rtype

    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 right-handed property of the coordinate system.

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Ax2

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates an axis placement. <A1> is the axis of the rotation . Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Ax2

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

Scaled()
  • Applies a scaling transformation on the axis placement. The ‘Location’ point of the axisplacement is modified. WarningsIf 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.
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Ax2

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.
    param A1

    type A1

    gp_Ax1

    rtype

    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.
    param V

    type V

    gp_Dir

    rtype

    None

SetLocation()
  • Changes the ‘Location’ point (origin) of <self>.
    param P

    type P

    gp_Pnt

    rtype

    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.
    param Vx

    type Vx

    gp_Dir

    rtype

    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.
    param Vy

    type Vy

    gp_Dir

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf

rtype

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.
    param T

    type T

    gp_Trsf

    rtype

    gp_Ax2

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates an axis plaxement in the direction of the vector <V>. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec

    rtype

    gp_Ax2* Translates an axis placement from the point <P1> to the point <P2>.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Ax2

XDirection()
  • Returns the ‘XDirection’ of <self>.
    rtype

    gp_Dir

YDirection()
  • Returns the ‘YDirection’ of <self>.
    rtype

    gp_Dir

property thisown

The membership flag

class gp_Ax22d(*args)

Bases: object

  • Creates an object representing the reference co-ordinate system (OXY).
    rtype

    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).

    param P

    type P

    gp_Pnt2d

    param Vx

    type Vx

    gp_Dir2d

    param Vy

    type Vy

    gp_Dir2d

    rtype

    None* Creates - a coordinate system with origin P and ‘X Direction’ V, which is: - right-handed if Sense is true (default value), or - left-handed if Sense is false

    param P

    type P

    gp_Pnt2d

    param V

    type V

    gp_Dir2d

    param Sense

    default value is Standard_True

    type Sense

    bool

    rtype

    None* Creates - a coordinate system where its origin is the origin of A and its ‘X Direction’ is the unit vector of A, which is: - right-handed if Sense is true (default value), or - left-handed if Sense is false.

    param A

    type A

    gp_Ax2d

    param Sense

    default value is Standard_True

    type Sense

    bool

    rtype

    None

Location()
  • Returns the ‘Location’ point (origin) of <self>.
    rtype

    gp_Pnt2d

Mirror()
Parameters

P

type P

gp_Pnt2d

rtype

None:param A:

type A

gp_Ax2d

rtype

None

Mirrored()
  • Performs the symmetrical transformation of an axis placement with respect to the point P which is the center of the symmetry. WarningsThe main direction of the axis placement is not changed. The ‘XDirection’ and the ‘YDirection’ are reversed. So the axis placement stay right handed.
    param P

    type P

    gp_Pnt2d

    rtype

    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.

    param A

    type A

    gp_Ax2d

    rtype

    gp_Ax22d

Rotate()
Parameters

P

type P

gp_Pnt2d

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates an axis placement. <A1> is the axis of the rotation . Ang is the angular value of the rotation in radians.
    param P

    type P

    gp_Pnt2d

    param Ang

    type Ang

    float

    rtype

    gp_Ax22d

Scale()
Parameters

P

type P

gp_Pnt2d

param S

type S

float

rtype

None

Scaled()
  • Applies a scaling transformation on the axis placement. The ‘Location’ point of the axisplacement is modified. WarningsIf 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.
    param P

    type P

    gp_Pnt2d

    param S

    type S

    float

    rtype

    gp_Ax22d

SetAxis()
  • Assigns the origin and the two unit vectors of the coordinate system A1 to this coordinate system.
    param A1

    type A1

    gp_Ax22d

    rtype

    None

SetLocation()
  • Changes the ‘Location’ point (origin) of <self>.
    param P

    type P

    gp_Pnt2d

    rtype

    None

SetXAxis()
  • Changes the XAxis and YAxis (‘Location’ point and ‘Direction’) of <self>. The ‘YDirection’ is recomputed in the same sense as before.
    param A1

    type A1

    gp_Ax2d

    rtype

    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 (right-handed or left-handed) of this coordinate system.
    param Vx

    type Vx

    gp_Dir2d

    rtype

    None

SetYAxis()
  • Changes the XAxis and YAxis (‘Location’ point and ‘Direction’) of <self>. The ‘XDirection’ is recomputed in the same sense as before.
    param A1

    type A1

    gp_Ax2d

    rtype

    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 (right-handed or left-handed) of this coordinate system.
    param Vy

    type Vy

    gp_Dir2d

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf2d

rtype

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.
    param T

    type T

    gp_Trsf2d

    rtype

    gp_Ax22d

Translate()
Parameters

V

type V

gp_Vec2d

rtype

None:param P1:

type P1

gp_Pnt2d

param P2

type P2

gp_Pnt2d

rtype

None

Translated()
  • Translates an axis plaxement in the direction of the vector <V>. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec2d

    rtype

    gp_Ax22d* Translates an axis placement from the point <P1> to the point <P2>.

    param P1

    type P1

    gp_Pnt2d

    param P2

    type P2

    gp_Pnt2d

    rtype

    gp_Ax22d

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.
    rtype

    gp_Ax2d

XDirection()
  • Returns the ‘XDirection’ of <self>.
    rtype

    gp_Dir2d

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.
    rtype

    gp_Ax2d

YDirection()
  • Returns the ‘YDirection’ of <self>.
    rtype

    gp_Dir2d

property thisown

The membership flag

class gp_Ax2d(*args)

Bases: object

  • Creates an axis object representing X axis of the reference co-ordinate system.
    rtype

    None* Creates an Ax2d. <P> is the ‘Location’ point of the axis placement and V is the ‘Direction’ of the axis placement.

    param P

    type P

    gp_Pnt2d

    param V

    type V

    gp_Dir2d

    rtype

    None

Angle()
  • Computes the angle, in radians, between this axis and the axis Other. The value of the angle is between -Pi and Pi.
    param Other

    type Other

    gp_Ax2d

    rtype

    float

Direction()
  • Returns the direction of <self>.
    rtype

    gp_Dir2d

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.
    param Other

    type Other

    gp_Ax2d

    param AngularTolerance

    type AngularTolerance

    float

    param LinearTolerance

    type LinearTolerance

    float

    rtype

    bool

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.
    param Other

    type Other

    gp_Ax2d

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

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.
    param Other

    type Other

    gp_Ax2d

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

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.
    param Other

    type Other

    gp_Ax2d

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

Location()
  • Returns the origin of <self>.
    rtype

    gp_Pnt2d

Mirror()
Parameters

P

type P

gp_Pnt2d

rtype

None:param A:

type A

gp_Ax2d

rtype

None

Mirrored()
  • Performs the symmetrical transformation of an axis placement with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt2d

    rtype

    gp_Ax2d* Performs the symmetrical transformation of an axis placement with respect to an axis placement which is the axis of the symmetry.

    param A

    type A

    gp_Ax2d

    rtype

    gp_Ax2d

Reverse()
  • Reverses the direction of <self> and assigns the result to this axis.
    rtype

    None

Reversed()
  • Computes a new axis placement with a direction opposite to the direction of <self>.
    rtype

    gp_Ax2d

Rotate()
Parameters

P

type P

gp_Pnt2d

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates an axis placement. <P> is the center of the rotation . Ang is the angular value of the rotation in radians.
    param P

    type P

    gp_Pnt2d

    param Ang

    type Ang

    float

    rtype

    gp_Ax2d

Scale()
Parameters

P

type P

gp_Pnt2d

param S

type S

float

rtype

None

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.
    param P

    type P

    gp_Pnt2d

    param S

    type S

    float

    rtype

    gp_Ax2d

SetDirection()
  • Changes the direction of <self>.
    param V

    type V

    gp_Dir2d

    rtype

    None

SetLocation()
  • Changes the ‘Location’ point (origin) of <self>.
    param Locat

    type Locat

    gp_Pnt2d

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf2d

rtype

None

Transformed()
  • Transforms an axis placement with a Trsf.
    param T

    type T

    gp_Trsf2d

    rtype

    gp_Ax2d

Translate()
Parameters

V

type V

gp_Vec2d

rtype

None:param P1:

type P1

gp_Pnt2d

param P2

type P2

gp_Pnt2d

rtype

None

Translated()
  • Translates an axis placement in the direction of the vector <V>. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec2d

    rtype

    gp_Ax2d* Translates an axis placement from the point <P1> to the point <P2>.

    param P1

    type P1

    gp_Pnt2d

    param P2

    type P2

    gp_Pnt2d

    rtype

    gp_Ax2d

property thisown

The membership flag

class gp_Ax3(*args)

Bases: object

  • Creates an object corresponding to the reference coordinate system (OXYZ).
    rtype

    None* Creates a coordinate system from a right-handed coordinate system.

    param A

    type A

    gp_Ax2

    rtype

    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).

    param P

    type P

    gp_Pnt

    param N

    type N

    gp_Dir

    param Vx

    type Vx

    gp_Dir

    rtype

    None* Creates an axis placement with the ‘Location’ point <P> and the normal direction <V>.

    param P

    type P

    gp_Pnt

    param V

    type V

    gp_Dir

    rtype

    None

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.
    param Other

    type Other

    gp_Ax3

    rtype

    float

Ax2()
  • Computes a right-handed coordinate system with the same ‘X Direction’ and ‘Y Direction’ as those of this coordinate system, then recomputes the ‘main Direction’. If this coordinate system is right-handed, the result returned is the same coordinate system. If this coordinate system is left-handed, the result is reversed.
    rtype

    gp_Ax2

Axis()
  • Returns the main axis of <self>. It is the ‘Location’ point and the main ‘Direction’.
    rtype

    gp_Ax1

Direct()
  • Returns True if the coordinate system is right-handed. i.e. XDirection().Crossed(YDirection()).Dot(Direction()) > 0
    rtype

    bool

Direction()
  • Returns the main direction of <self>.
    rtype

    gp_Dir

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).
    param Other

    type Other

    gp_Ax3

    param LinearTolerance

    type LinearTolerance

    float

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool* 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.

    param A1

    type A1

    gp_Ax1

    param LinearTolerance

    type LinearTolerance

    float

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

Location()
  • Returns the ‘Location’ point (origin) of <self>.
    rtype

    gp_Pnt

Mirror()
Parameters

P

type P

gp_Pnt

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of an axis placement with respect to the point P which is the center of the symmetry. WarningsThe main direction of the axis placement is not changed. The ‘XDirection’ and the ‘YDirection’ are reversed. So the axis placement stay right handed.
    param P

    type P

    gp_Pnt

    rtype

    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.

    param A1

    type A1

    gp_Ax1

    rtype

    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.

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Ax3

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates an axis placement. <A1> is the axis of the rotation . Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Ax3

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

Scaled()
  • Applies a scaling transformation on the axis placement. The ‘Location’ point of the axisplacement is modified. WarningsIf 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.
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Ax3

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 (right-handed or left-handed) 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’.
    param A1

    type A1

    gp_Ax1

    rtype

    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 right-handed) 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’.
    param V

    type V

    gp_Dir

    rtype

    None

SetLocation()
  • Changes the ‘Location’ point (origin) of <self>.
    param P

    type P

    gp_Pnt

    rtype

    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>
    param Vx

    type Vx

    gp_Dir

    rtype

    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>
    param Vy

    type Vy

    gp_Dir

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf

rtype

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.
    param T

    type T

    gp_Trsf

    rtype

    gp_Ax3

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates an axis plaxement in the direction of the vector <V>. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec

    rtype

    gp_Ax3* Translates an axis placement from the point <P1> to the point <P2>.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Ax3

XDirection()
  • Returns the ‘XDirection’ of <self>.
    rtype

    gp_Dir

XReverse()
  • Reverses the X direction of <self>.
    rtype

    None

YDirection()
  • Returns the ‘YDirection’ of <self>.
    rtype

    gp_Dir

YReverse()
  • Reverses the Y direction of <self>.
    rtype

    None

ZReverse()
  • Reverses the Z direction of <self>.
    rtype

    None

property thisown

The membership flag

class gp_Circ(*args)

Bases: object

  • Creates an indefinite circle.
    rtype

    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

    param A2

    type A2

    gp_Ax2

    param Radius

    type Radius

    float

    rtype

    None

Area()
  • Computes the area of the circle.
    rtype

    float

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.
    rtype

    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.
    param P

    type P

    gp_Pnt

    param LinearTolerance

    type LinearTolerance

    float

    rtype

    bool

Distance()
  • Computes the minimum of distance between the point P and any point on the circumference of the circle.
    param P

    type P

    gp_Pnt

    rtype

    float

Length()
  • Computes the circumference of the circle.
    rtype

    float

Location()
  • Returns the center of the circle. It is the ‘Location’ point of the local coordinate system of the circle
    rtype

    gp_Pnt

Mirror()
Parameters

P

type P

gp_Pnt

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a circle with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt

    rtype

    gp_Circ* Performs the symmetrical transformation of a circle with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax1

    rtype

    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).

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Circ

Position()
  • Returns the position of the circle. It is the local coordinate system of the circle.
    rtype

    gp_Ax2

Radius()
  • Returns the radius of this circle.
    rtype

    float

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a circle. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Circ

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

Scaled()
  • Scales a circle. S is the scaling value. WarningsIf S is negative the radius stay positive but the ‘XAxis’ and the ‘YAxis’ are reversed as for an ellipse.
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Circ

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.
    param A1

    type A1

    gp_Ax1

    rtype

    None

SetLocation()
  • Changes the ‘Location’ point (center) of the circle.
    param P

    type P

    gp_Pnt

    rtype

    None

SetPosition()
  • Changes the position of the circle.
    param A2

    type A2

    gp_Ax2

    rtype

    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.
    param Radius

    type Radius

    float

    rtype

    None

SquareDistance()
  • Computes the square distance between <self> and the point P.
    param P

    type P

    gp_Pnt

    rtype

    float

Transform()
Parameters

T

type T

gp_Trsf

rtype

None

Transformed()
  • Transforms a circle with the transformation T from class Trsf.
    param T

    type T

    gp_Trsf

    rtype

    gp_Circ

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates a circle in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec

    rtype

    gp_Circ* Translates a circle from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Circ

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.
    rtype

    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’.
    rtype

    gp_Ax1

property thisown

The membership flag

class gp_Circ2d(*args)

Bases: object

  • creates an indefinite circle.
    rtype

    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.

    param XAxis

    type XAxis

    gp_Ax2d

    param Radius

    type Radius

    float

    param Sense

    default value is Standard_True

    type Sense

    bool

    rtype

    None* 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.

    param Axis

    type Axis

    gp_Ax22d

    param Radius

    type Radius

    float

    rtype

    None

Area()
  • Computes the area of the circle.
    rtype

    float

Axis()
  • returns the position of the circle.
    rtype

    gp_Ax22d

Coefficients()
  • Returns the normalized coefficients from the implicit equation of the circleA * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.0
    param A

    type A

    float

    param B

    type B

    float

    param C

    type C

    float

    param D

    type D

    float

    param E

    type E

    float

    param F

    type F

    float

    rtype

    None

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>.
    param P

    type P

    gp_Pnt2d

    param LinearTolerance

    type LinearTolerance

    float

    rtype

    bool

Distance()
  • Computes the minimum of distance between the point P and any point on the circumference of the circle.
    param P

    type P

    gp_Pnt2d

    rtype

    float

IsDirect()
  • Returns true if the local coordinate system is direct and false in the other case.
    rtype

    bool

Length()
  • computes the circumference of the circle.
    rtype

    float

Location()
  • Returns the location point (center) of the circle.
    rtype

    gp_Pnt2d

Mirror()
Parameters

P

type P

gp_Pnt2d

rtype

None:param A:

type A

gp_Ax2d

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a circle with respect to the point P which is the center of the symmetry
    param P

    type P

    gp_Pnt2d

    rtype

    gp_Circ2d* Performs the symmetrical transformation of a circle with respect to an axis placement which is the axis of the symmetry.

    param A

    type A

    gp_Ax2d

    rtype

    gp_Circ2d

Position()
  • returns the position of the circle. Idem Axis(me).
    rtype

    gp_Ax22d

Radius()
  • Returns the radius value of the circle.
    rtype

    float

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,
    rtype

    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.
    rtype

    gp_Circ2d

Rotate()
Parameters

P

type P

gp_Pnt2d

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a circle. P is the center of the rotation. Ang is the angular value of the rotation in radians.
    param P

    type P

    gp_Pnt2d

    param Ang

    type Ang

    float

    rtype

    gp_Circ2d

Scale()
Parameters

P

type P

gp_Pnt2d

param S

type S

float

rtype

None

Scaled()
  • Scales a circle. S is the scaling value. WarningsIf S is negative the radius stay positive but the ‘XAxis’ and the ‘YAxis’ are reversed as for an ellipse.
    param P

    type P

    gp_Pnt2d

    param S

    type S

    float

    rtype

    gp_Circ2d

SetAxis()
  • Changes the X axis of the circle.
    param A

    type A

    gp_Ax22d

    rtype

    None

SetLocation()
  • Changes the location point (center) of the circle.
    param P

    type P

    gp_Pnt2d

    rtype

    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.
    param Radius

    type Radius

    float

    rtype

    None

SetXAxis()
  • Changes the X axis of the circle.
    param A

    type A

    gp_Ax2d

    rtype

    None

SetYAxis()
  • Changes the Y axis of the circle.
    param A

    type A

    gp_Ax2d

    rtype

    None

SquareDistance()
  • Computes the square distance between <self> and the point P.
    param P

    type P

    gp_Pnt2d

    rtype

    float

Transform()
Parameters

T

type T

gp_Trsf2d

rtype

None

Transformed()
  • Transforms a circle with the transformation T from class Trsf2d.
    param T

    type T

    gp_Trsf2d

    rtype

    gp_Circ2d

Translate()
Parameters

V

type V

gp_Vec2d

rtype

None:param P1:

type P1

gp_Pnt2d

param P2

type P2

gp_Pnt2d

rtype

None

Translated()
  • Translates a circle in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec2d

    rtype

    gp_Circ2d* Translates a circle from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt2d

    param P2

    type P2

    gp_Pnt2d

    rtype

    gp_Circ2d

XAxis()
  • returns the X axis of the circle.
    rtype

    gp_Ax2d

YAxis()
  • Returns the Y axis of the circle. Reverses the direction of the circle.
    rtype

    gp_Ax2d

property thisown

The membership flag

class gp_Cone(*args)

Bases: object

  • Creates an indefinite Cone.
    rtype

    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 semi-angle. Its absolute value is in range ]0, PI/2[. Radius is the radius of the circle in the reference plane of the cone. Raises ConstructionError * if Radius is lower than 0.0 * Abs(Ang) < Resolution from gp or Abs(Ang) >= (PI/2) - Resolution.

    param A3

    type A3

    gp_Ax3

    param Ang

    type Ang

    float

    param Radius

    type Radius

    float

    rtype

    None

Apex()
  • Computes the cone’s top. The Apex of the cone is on the negative side of the symmetry axis of the cone.
    rtype

    gp_Pnt

Axis()
  • returns the symmetry axis of the cone.
    rtype

    gp_Ax1

Coefficients()
  • Computes the coefficients of the implicit equation of the quadric in the absolute cartesian coordinates systemA1.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
    param A1

    type A1

    float

    param A2

    type A2

    float

    param A3

    type A3

    float

    param B1

    type B1

    float

    param B2

    type B2

    float

    param B3

    type B3

    float

    param C1

    type C1

    float

    param C2

    type C2

    float

    param C3

    type C3

    float

    param D

    type D

    float

    rtype

    None

Direct()
  • Returns true if the local coordinate system of this cone is right-handed.
    rtype

    bool

Location()
  • returns the ‘Location’ point of the cone.
    rtype

    gp_Pnt

Mirror()
Parameters

P

type P

gp_Pnt

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a cone with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt

    rtype

    gp_Cone* Performs the symmetrical transformation of a cone with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax1

    rtype

    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).

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Cone

Position()
  • Returns the local coordinates system of the cone.
    rtype

    gp_Ax3

RefRadius()
  • Returns the radius of the cone in the reference plane.
    rtype

    float

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a cone. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Cone

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

Scaled()
  • Scales a cone. S is the scaling value. The absolute value of S is used to scale the cone
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Cone

SemiAngle()
  • Returns the half-angle at the apex of this cone. Attention! Semi-angle can be negative.
    rtype

    float

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.
    param A1

    type A1

    gp_Ax1

    rtype

    None

SetLocation()
  • Changes the location of the cone.
    param Loc

    type Loc

    gp_Pnt

    rtype

    None

SetPosition()
  • Changes the local coordinate system of the cone. This coordinate system defines the reference plane of the cone.
    param A3

    type A3

    gp_Ax3

    rtype

    None

SetRadius()
  • Changes the radius of the cone in the reference plane of the cone. Raised if R < 0.0
    param R

    type R

    float

    rtype

    None

SetSemiAngle()
  • Changes the semi-angle of the cone. Semi-angle can be negative. Its absolute value Abs(Ang) is in range ]0,PI/2[. Raises ConstructionError if Abs(Ang) < Resolution from gp or Abs(Ang) >= PI/2 - Resolution
    param Ang

    type Ang

    float

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf

rtype

None

Transformed()
  • Transforms a cone with the transformation T from class Trsf.
    param T

    type T

    gp_Trsf

    rtype

    gp_Cone

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates a cone in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec

    rtype

    gp_Cone* Translates a cone from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Cone

UReverse()
  • Reverses the U parametrization of the cone reversing the YAxis.
    rtype

    None

VReverse()
  • Reverses the V parametrization of the cone reversing the ZAxis.
    rtype

    None

XAxis()
  • Returns the XAxis of the reference plane.
    rtype

    gp_Ax1

YAxis()
  • Returns the YAxis of the reference plane.
    rtype

    gp_Ax1

property thisown

The membership flag

class gp_Cylinder(*args)

Bases: object

  • Creates a indefinite cylinder.
    rtype

    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

    param A3

    type A3

    gp_Ax3

    param Radius

    type Radius

    float

    rtype

    None

Axis()
  • Returns the symmetry axis of the cylinder.
    rtype

    gp_Ax1

Coefficients()
  • Computes the coefficients of the implicit equation of the quadric in the absolute cartesian coordinate systemA1.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
    param A1

    type A1

    float

    param A2

    type A2

    float

    param A3

    type A3

    float

    param B1

    type B1

    float

    param B2

    type B2

    float

    param B3

    type B3

    float

    param C1

    type C1

    float

    param C2

    type C2

    float

    param C3

    type C3

    float

    param D

    type D

    float

    rtype

    None

Direct()
  • Returns true if the local coordinate system of this cylinder is right-handed.
    rtype

    bool

Location()
  • Returns the ‘Location’ point of the cylinder.
    rtype

    gp_Pnt

Mirror()
Parameters

P

type P

gp_Pnt

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a cylinder with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt

    rtype

    gp_Cylinder* Performs the symmetrical transformation of a cylinder with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax1

    rtype

    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).

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Cylinder

Position()
  • Returns the local coordinate system of the cylinder.
    rtype

    gp_Ax3

Radius()
  • Returns the radius of the cylinder.
    rtype

    float

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a cylinder. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Cylinder

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

Scaled()
  • Scales a cylinder. S is the scaling value. The absolute value of S is used to scale the cylinder
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Cylinder

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.
    param A1

    type A1

    gp_Ax1

    rtype

    None

SetLocation()
  • Changes the location of the surface.
    param Loc

    type Loc

    gp_Pnt

    rtype

    None

SetPosition()
  • Change the local coordinate system of the surface.
    param A3

    type A3

    gp_Ax3

    rtype

    None

SetRadius()
  • Modifies the radius of this cylinder. Exceptions Standard_ConstructionError if R is negative.
    param R

    type R

    float

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf

rtype

None

Transformed()
  • Transforms a cylinder with the transformation T from class Trsf.
    param T

    type T

    gp_Trsf

    rtype

    gp_Cylinder

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates a cylinder in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec

    rtype

    gp_Cylinder* Translates a cylinder from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Cylinder

UReverse()
  • Reverses the U parametrization of the cylinder reversing the YAxis.
    rtype

    None

VReverse()
  • Reverses the V parametrization of the plane reversing the Axis.
    rtype

    None

XAxis()
  • Returns the axis X of the cylinder.
    rtype

    gp_Ax1

YAxis()
  • Returns the axis Y of the cylinder.
    rtype

    gp_Ax1

property thisown

The membership flag

class gp_Dir(*args)

Bases: object

  • Creates a direction corresponding to X axis.
    rtype

    None* Normalizes the vector V and creates a direction. Raises ConstructionError if V.Magnitude() <= Resolution.

    param V

    type V

    gp_Vec

    rtype

    None* Creates a direction from a triplet of coordinates. Raises ConstructionError if Coord.Modulus() <= Resolution from gp.

    param Coord

    type Coord

    gp_XYZ

    rtype

    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.

    param Xv

    type Xv

    float

    param Yv

    type Yv

    float

    param Zv

    type Zv

    float

    rtype

    None

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]
    param Other

    type Other

    gp_Dir

    rtype

    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.
    param Other

    type Other

    gp_Dir

    param VRef

    type VRef

    gp_Dir

    rtype

    float

Coord()
  • Returns the coordinate of range IndexIndex = 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.
    param Index

    type Index

    int

    rtype

    float* Returns for the unit vector its three coordinates Xv, Yv, and Zv.

    param Xv

    type Xv

    float

    param Yv

    type Yv

    float

    param Zv

    type Zv

    float

    rtype

    None

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.
    param Right

    type Right

    gp_Dir

    rtype

    None

CrossCross()
Parameters

V1

type V1

gp_Dir

param V2

type V2

gp_Dir

rtype

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.
    param V1

    type V1

    gp_Dir

    param V2

    type V2

    gp_Dir

    rtype

    gp_Dir

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.
    param Right

    type Right

    gp_Dir

    rtype

    gp_Dir

Dot()
  • Computes the scalar product
    param Other

    type Other

    gp_Dir

    rtype

    float

DotCross()
  • Computes the triple scalar product <self> * (V1 ^ V2). WarningsThe 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.
    param V1

    type V1

    gp_Dir

    param V2

    type V2

    gp_Dir

    rtype

    float

IsEqual()
  • Returns True if the angle between the two directions is lower or equal to AngularTolerance.
    param Other

    type Other

    gp_Dir

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

IsNormal()
  • Returns True if the angle between this unit vector and the unit vector Other is equal to Pi/2 (normal).
    param Other

    type Other

    gp_Dir

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

IsOpposite()
  • Returns True if the angle between this unit vector and the unit vector Other is equal to Pi (opposite).
    param Other

    type Other

    gp_Dir

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

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.
    param Other

    type Other

    gp_Dir

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

Mirror()
Parameters

V

type V

gp_Dir

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a direction with respect to the direction V which is the center of the symmetry.
    param V

    type V

    gp_Dir

    rtype

    gp_Dir* Performs the symmetrical transformation of a direction with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax1

    rtype

    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).

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Dir

Reverse()
Return type

None

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.]
    rtype

    gp_Dir

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a direction. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Dir

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.
    param Index

    type Index

    int

    param Xi

    type Xi

    float

    rtype

    None* 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.

    param Xv

    type Xv

    float

    param Yv

    type Yv

    float

    param Zv

    type Zv

    float

    rtype

    None

SetX()
  • Assigns the given value to the X coordinate of this unit vector.
    param X

    type X

    float

    rtype

    None

SetXYZ()
  • Assigns the three coordinates of Coord to this unit vector.
    param Coord

    type Coord

    gp_XYZ

    rtype

    None

SetY()
  • Assigns the given value to the Y coordinate of this unit vector.
    param Y

    type Y

    float

    rtype

    None

SetZ()
  • Assigns the given value to the Z coordinate of this unit vector.
    param Z

    type Z

    float

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf

rtype

None

Transformed()
  • Transforms a direction with a ‘Trsf’ from gp. WarningsIf the scale factor of the ‘Trsf’ T is negative then the direction <self> is reversed.
    param T

    type T

    gp_Trsf

    rtype

    gp_Dir

X()
  • Returns the X coordinate for a unit vector.
    rtype

    float

XYZ()
  • for this unit vector, returns its three coordinates as a number triplea.
    rtype

    gp_XYZ

Y()
  • Returns the Y coordinate for a unit vector.
    rtype

    float

Z()
  • Returns the Z coordinate for a unit vector.
    rtype

    float

property thisown

The membership flag

class gp_Dir2d(*args)

Bases: object

  • Creates a direction corresponding to X axis.
    rtype

    None* Normalizes the vector V and creates a Direction. Raises ConstructionError if V.Magnitude() <= Resolution from gp.

    param V

    type V

    gp_Vec2d

    rtype

    None* Creates a Direction from a doublet of coordinates. Raises ConstructionError if Coord.Modulus() <= Resolution from gp.

    param Coord

    type Coord

    gp_XY

    rtype

    None* Creates a Direction with its 2 cartesian coordinates. Raises ConstructionError if Sqrt(Xv*Xv + Yv*Yv) <= Resolution from gp.

    param Xv

    type Xv

    float

    param Yv

    type Yv

    float

    rtype

    None

Angle()
  • Computes the angular value in radians between <self> and <Other>. Returns the angle in the range [-PI, PI].
    param Other

    type Other

    gp_Dir2d

    rtype

    float

Coord()
  • For this unit vector returns the coordinate of range IndexIndex = 1 => X is returned Index = 2 => Y is returned Raises OutOfRange if Index != {1, 2}.
    param Index

    type Index

    int

    rtype

    float* For this unit vector returns its two coordinates Xv and Yv. Raises OutOfRange if Index != {1, 2}.

    param Xv

    type Xv

    float

    param Yv

    type Yv

    float

    rtype

    None

Crossed()
  • Computes the cross product between two directions.
    param Right

    type Right

    gp_Dir2d

    rtype

    float

Dot()
  • Computes the scalar product
    param Other

    type Other

    gp_Dir2d

    rtype

    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.
    param Other

    type Other

    gp_Dir2d

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

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
    param Other

    type Other

    gp_Dir2d

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

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
    param Other

    type Other

    gp_Dir2d

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

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
    param Other

    type Other

    gp_Dir2d

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

Mirror()
Parameters

V

type V

gp_Dir2d

rtype

None:param A:

type A

gp_Ax2d

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a direction with respect to the direction V which is the center of the symmetry.
    param V

    type V

    gp_Dir2d

    rtype

    gp_Dir2d* Performs the symmetrical transformation of a direction with respect to an axis placement which is the axis of the symmetry.

    param A

    type A

    gp_Ax2d

    rtype

    gp_Dir2d

Reverse()
Return type

None

Reversed()
  • Reverses the orientation of a direction
    rtype

    gp_Dir2d

Rotate()
Parameters

Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a direction. Ang is the angular value of the rotation in radians.
    param Ang

    type Ang

    float

    rtype

    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}.
    param Index

    type Index

    int

    param Xi

    type Xi

    float

    rtype

    None* 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}.

    param Xv

    type Xv

    float

    param Yv

    type Yv

    float

    rtype

    None

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.
    param X

    type X

    float

    rtype

    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.
    param Coord

    type Coord

    gp_XY

    rtype

    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.
    param Y

    type Y

    float

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf2d

rtype

None

Transformed()
  • Transforms a direction with the ‘Trsf’ T. WarningsIf the scale factor of the ‘Trsf’ T is negative then the direction <self> is reversed.
    param T

    type T

    gp_Trsf2d

    rtype

    gp_Dir2d

X()
  • For this unit vector, returns its X coordinate.
    rtype

    float

XY()
  • For this unit vector, returns its two coordinates as a number pair. Comparison between Directions The precision value is an input data.
    rtype

    gp_XY

Y()
  • For this unit vector, returns its Y coordinate.
    rtype

    float

property thisown

The membership flag

class gp_Elips(*args)

Bases: object

  • Creates an indefinite ellipse.
    rtype

    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.

    param A2

    type A2

    gp_Ax2

    param MajorRadius

    type MajorRadius

    float

    param MinorRadius

    type MinorRadius

    float

    rtype

    None

Area()
  • Computes the area of the Ellipse.
    rtype

    float

Axis()
  • Computes the axis normal to the plane of the ellipse.
    rtype

    gp_Ax1

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).
    rtype

    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).
    rtype

    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
    rtype

    float

Focal()
  • Computes the focal distance. It is the distance between the two focus focus1 and focus2 of the ellipse.
    rtype

    float

Focus1()
  • Returns the first focus of the ellipse. This focus is on the positive side of the ‘XAxis’ of the ellipse.
    rtype

    gp_Pnt

Focus2()
  • Returns the second focus of the ellipse. This focus is on the negative side of the ‘XAxis’ of the ellipse.
    rtype

    gp_Pnt

Location()
  • Returns the center of the ellipse. It is the ‘Location’ point of the coordinate system of the ellipse.
    rtype

    gp_Pnt

MajorRadius()
  • Returns the major radius of the ellipse.
    rtype

    float

MinorRadius()
  • Returns the minor radius of the ellipse.
    rtype

    float

Mirror()
Parameters

P

type P

gp_Pnt

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of an ellipse with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt

    rtype

    gp_Elips* Performs the symmetrical transformation of an ellipse with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax1

    rtype

    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).

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Elips

Parameter()
  • Returns p = (1 - e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0
    rtype

    float

Position()
  • Returns the coordinate system of the ellipse.
    rtype

    gp_Ax2

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates an ellipse. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Elips

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

Scaled()
  • Scales an ellipse. S is the scaling value.
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Elips

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.
    param A1

    type A1

    gp_Ax1

    rtype

    None

SetLocation()
  • Modifies this ellipse, by redefining its local coordinate so that its origin becomes P.
    param P

    type P

    gp_Pnt

    rtype

    None

SetMajorRadius()
  • The major radius of the ellipse is on the ‘XAxis’ (major axis) of the ellipse. Raises ConstructionError if MajorRadius < MinorRadius.
    param MajorRadius

    type MajorRadius

    float

    rtype

    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.
    param MinorRadius

    type MinorRadius

    float

    rtype

    None

SetPosition()
  • Modifies this ellipse, by redefining its local coordinate so that it becomes A2e.
    param A2

    type A2

    gp_Ax2

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf

rtype

None

Transformed()
  • Transforms an ellipse with the transformation T from class Trsf.
    param T

    type T

    gp_Trsf

    rtype

    gp_Elips

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates an ellipse in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec

    rtype

    gp_Elips* Translates an ellipse from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Elips

XAxis()
  • Returns the ‘XAxis’ of the ellipse whose origin is the center of this ellipse. It is the major axis of the ellipse.
    rtype

    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.
    rtype

    gp_Ax1

property thisown

The membership flag

class gp_Elips2d(*args)

Bases: object

  • Creates an indefinite ellipse.
    rtype

    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

    param MajorAxis

    type MajorAxis

    gp_Ax2d

    param MajorRadius

    type MajorRadius

    float

    param MinorRadius

    type MinorRadius

    float

    param Sense

    default value is Standard_True

    type Sense

    bool

    rtype

    None* 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

    param A

    type A

    gp_Ax22d

    param MajorRadius

    type MajorRadius

    float

    param MinorRadius

    type MinorRadius

    float

    rtype

    None

Area()
  • Computes the area of the ellipse.
    rtype

    float

Axis()
  • Returns the major axis of the ellipse.
    rtype

    gp_Ax22d

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.
    param A

    type A

    float

    param B

    type B

    float

    param C

    type C

    float

    param D

    type D

    float

    param E

    type E

    float

    param F

    type F

    float

    rtype

    None

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)
    rtype

    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).
    rtype

    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.
    rtype

    float

Focal()
  • Returns the distance between the center of the ellipse and focus1 or focus2.
    rtype

    float

Focus1()
  • Returns the first focus of the ellipse. This focus is on the positive side of the major axis of the ellipse.
    rtype

    gp_Pnt2d

Focus2()
  • Returns the second focus of the ellipse. This focus is on the negative side of the major axis of the ellipse.
    rtype

    gp_Pnt2d

IsDirect()
  • Returns true if the local coordinate system is direct and false in the other case.
    rtype

    bool

Location()
  • Returns the center of the ellipse.
    rtype

    gp_Pnt2d

MajorRadius()
  • Returns the major radius of the Ellipse.
    rtype

    float

MinorRadius()
  • Returns the minor radius of the Ellipse.
    rtype

    float

Mirror()
Parameters

P

type P

gp_Pnt2d

rtype

None:param A:

type A

gp_Ax2d

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a ellipse with respect to the point P which is the center of the symmetry
    param P

    type P

    gp_Pnt2d

    rtype

    gp_Elips2d* Performs the symmetrical transformation of a ellipse with respect to an axis placement which is the axis of the symmetry.

    param A

    type A

    gp_Ax2d

    rtype

    gp_Elips2d

Parameter()
  • Returns p = (1 - e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0
    rtype

    float

Reverse()
Return type

None

Reversed()
Return type

gp_Elips2d

Rotate()
Parameters

P

type P

gp_Pnt2d

param Ang

type Ang

float

rtype

None

Rotated()
Parameters

P

type P

gp_Pnt2d

param Ang

type Ang

float

rtype

gp_Elips2d

Scale()
Parameters

P

type P

gp_Pnt2d

param S

type S

float

rtype

None

Scaled()
  • Scales a ellipse. S is the scaling value.
    param P

    type P

    gp_Pnt2d

    param S

    type S

    float

    rtype

    gp_Elips2d

SetAxis()
  • Modifies this ellipse, by redefining its local coordinate system so that it becomes A.
    param A

    type A

    gp_Ax22d

    rtype

    None

SetLocation()
  • Modifies this ellipse, by redefining its local coordinate system so that - its origin becomes P.
    param P

    type P

    gp_Pnt2d

    rtype

    None

SetMajorRadius()
  • Changes the value of the major radius. Raises ConstructionError if MajorRadius < MinorRadius.
    param MajorRadius

    type MajorRadius

    float

    rtype

    None

SetMinorRadius()
  • Changes the value of the minor radius. Raises ConstructionError if MajorRadius < MinorRadius or MinorRadius < 0.0
    param MinorRadius

    type MinorRadius

    float

    rtype

    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.
    param A

    type A

    gp_Ax2d

    rtype

    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.
    param A

    type A

    gp_Ax2d

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf2d

rtype

None

Transformed()
  • Transforms an ellipse with the transformation T from class Trsf2d.
    param T

    type T

    gp_Trsf2d

    rtype

    gp_Elips2d

Translate()
Parameters

V

type V

gp_Vec2d

rtype

None:param P1:

type P1

gp_Pnt2d

param P2

type P2

gp_Pnt2d

rtype

None

Translated()
  • Translates a ellipse in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec2d

    rtype

    gp_Elips2d* Translates a ellipse from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt2d

    param P2

    type P2

    gp_Pnt2d

    rtype

    gp_Elips2d

XAxis()
  • Returns the major axis of the ellipse.
    rtype

    gp_Ax2d

YAxis()
  • Returns the minor axis of the ellipse. Reverses the direction of the circle.
    rtype

    gp_Ax2d

property thisown

The membership flag

class gp_GTrsf(*args)

Bases: object

  • Returns the Identity transformation.
    rtype

    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.

    param T

    type T

    gp_Trsf

    rtype

    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

    param M

    type M

    gp_Mat

    param V

    type V

    gp_XYZ

    rtype

    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, a compound transformation or some other type of transformation.
    rtype

    gp_TrsfForm

Invert()
Return type

None

Inverted()
  • Computes the reverse transformation. Raises an exception if the matrix of the transformation is not inversible.
    rtype

    gp_GTrsf

IsNegative()
  • Returns true if the determinant of the vectorial part of this transformation is negative.
    rtype

    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.
    rtype

    bool

Multiplied()
  • Computes the transformation composed from T and <self>. In a C++ implementation you can also write Tcomposed = <self> * T. ExampleGTrsf T1, T2, Tcomp; …………… //compositionTcomp = 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 !!!
    param T

    type T

    gp_GTrsf

    rtype

    gp_GTrsf

Multiply()
  • Computes the transformation composed with <self> and T. <self> = <self> * T
    param T

    type T

    gp_GTrsf

    rtype

    None

Power()
Parameters

N

type N

int

rtype

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.
    param N

    type N

    int

    rtype

    gp_GTrsf

PreMultiply()
  • Computes the product of the transformation T and this transformation and assigns the result to this transformation. this = T * this
    param T

    type T

    gp_GTrsf

    rtype

    None

SetAffinity()
  • Changes this transformation into an affinity of ratio Ratio with respect to the axis A1. Note: an affinity is a point-by-point transformation that transforms any point P into a point P’ such that if H is the orthogonal projection of P on the axis A1 or the plane A2, the vectors HP and HP’ satisfy: HP’ = Ratio * HP.
    param A1

    type A1

    gp_Ax1

    param Ratio

    type Ratio

    float

    rtype

    None* 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 point-by-point transformation that transforms any point P into a point P’ such that if H is the orthogonal projection of P on the axis A1 or the plane A2, the vectors HP and HP’ satisfy: HP’ = Ratio * HP.

    param A2

    type A2

    gp_Ax2

    param Ratio

    type Ratio

    float

    rtype

    None

SetForm()
  • verify and set the shape of the GTrsf Other or CompoundTrsf ExmyGTrsf.SetValue(row1,col1,val1); myGTrsf.SetValue(row2,col2,val2); … myGTrsf.SetForm();
    rtype

    None

SetTranslationPart()
  • Replaces the translation part of this transformation by the coordinates of the number triple Coord.
    param Coord

    type Coord

    gp_XYZ

    rtype

    None

SetTrsf()
  • Assigns the vectorial and translation parts of T to this transformation.
    param T

    type T

    gp_Trsf

    rtype

    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
    param Row

    type Row

    int

    param Col

    type Col

    int

    param Value

    type Value

    float

    rtype

    None

SetVectorialPart()
  • Replaces the vectorial part of this transformation by Matrix.
    param Matrix

    type Matrix

    gp_Mat

    rtype

    None

Transforms()
Parameters

Coord

type Coord

gp_XYZ

rtype

None* Transforms a triplet XYZ with a GTrsf.

param X

type X

float

param Y

type Y

float

param Z

type Z

float

rtype

None

TranslationPart()
  • Returns the translation part of the GTrsf.
    rtype

    gp_XYZ

Trsf()
Return type

gp_Trsf

Value()
  • Returns the coefficients of the global matrix of transformation. Raises OutOfRange if Row < 1 or Row > 3 or Col < 1 or Col > 4
    param Row

    type Row

    int

    param Col

    type Col

    int

    rtype

    float

VectorialPart()
  • Computes the vectorial part of the GTrsf. The returned Matrix is a 3*3 matrix.
    rtype

    gp_Mat

property thisown

The membership flag

class gp_GTrsf2d(*args)

Bases: object

  • returns identity transformation.
    rtype

    None* Converts the gp_Trsf2d transformation T into a general transformation.

    param T

    type T

    gp_Trsf2d

    rtype

    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.

    param M

    type M

    gp_Mat2d

    param V

    type V

    gp_XY

    rtype

    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 or axis), a scaling transformation, a compound transformation or some other type of transformation.
    rtype

    gp_TrsfForm

Invert()
Return type

None

Inverted()
  • Computes the reverse transformation. Raised an exception if the matrix of the transformation is not inversible.
    rtype

    gp_GTrsf2d

IsNegative()
  • Returns true if the determinant of the vectorial part of this transformation is negative.
    rtype

    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.
    rtype

    bool

Multiplied()
  • Computes the transformation composed with T and <self>. In a C++ implementation you can also write Tcomposed = <self> * T. ExampleGTrsf2d T1, T2, Tcomp; …………… //compositionTcomp = 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 !!!
    param T

    type T

    gp_GTrsf2d

    rtype

    gp_GTrsf2d

Multiply()
Parameters

T

type T

gp_GTrsf2d

rtype

None

Power()
Parameters

N

type N

int

rtype

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.
    param N

    type N

    int

    rtype

    gp_GTrsf2d

PreMultiply()
  • Computes the product of the transformation T and this transformation, and assigns the result to this transformation: this = T * this
    param T

    type T

    gp_GTrsf2d

    rtype

    None

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

    type A

    gp_Ax2d

    param Ratio

    type Ratio

    float

    rtype

    None

SetTranslationPart()
  • Replacesthe translation part of this transformation by the coordinates of the number pair Coord.
    param Coord

    type Coord

    gp_XY

    rtype

    None

SetTrsf2d()
  • Assigns the vectorial and translation parts of T to this transformation.
    param T

    type T

    gp_Trsf2d

    rtype

    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
    param Row

    type Row

    int

    param Col

    type Col

    int

    param Value

    type Value

    float

    rtype

    None

SetVectorialPart()
  • Replaces the vectorial part of this transformation by Matrix.
    param Matrix

    type Matrix

    gp_Mat2d

    rtype

    None

Transformed()
Parameters

Coord

type Coord

gp_XY

rtype

gp_XY

Transforms()
Parameters

Coord

type Coord

gp_XY

rtype

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.

param X

type X

float

param Y

type Y

float

rtype

None

TranslationPart()
  • Returns the translation part of the GTrsf2d.
    rtype

    gp_XY

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.
    rtype

    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
    param Row

    type Row

    int

    param Col

    type Col

    int

    rtype

    float

VectorialPart()
  • Computes the vectorial part of the GTrsf2d. The returned Matrix is a 2*2 matrix.
    rtype

    gp_Mat2d

property thisown

The membership flag

class gp_Hypr(*args)

Bases: object

  • Creates of an indefinite hyperbola.
    rtype

    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

    param A2

    type A2

    gp_Ax2

    param MajorRadius

    type MajorRadius

    float

    param MinorRadius

    type MinorRadius

    float

    rtype

    None

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
    rtype

    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
    rtype

    gp_Ax1

Axis()
  • Returns the axis passing through the center, and normal to the plane of this hyperbola.
    rtype

    gp_Ax1

ConjugateBranch1()
  • Computes the branch of hyperbola which is on the positive side of the ‘YAxis’ of <self>.
    rtype

    gp_Hypr

ConjugateBranch2()
  • Computes the branch of hyperbola which is on the negative side of the ‘YAxis’ of <self>.
    rtype

    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’.
    rtype

    gp_Ax1

Directrix2()
  • This line is obtained by the symmetrical transformation of ‘Directrix1’ with respect to the ‘YAxis’ of the hyperbola.
    rtype

    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
    rtype

    float

Focal()
  • Computes the focal distance. It is the distance between the the two focus of the hyperbola.
    rtype

    float

Focus1()
  • Returns the first focus of the hyperbola. This focus is on the positive side of the ‘XAxis’ of the hyperbola.
    rtype

    gp_Pnt

Focus2()
  • Returns the second focus of the hyperbola. This focus is on the negative side of the ‘XAxis’ of the hyperbola.
    rtype

    gp_Pnt

Location()
  • Returns the location point of the hyperbola. It is the intersection point between the ‘XAxis’ and the ‘YAxis’.
    rtype

    gp_Pnt

MajorRadius()
  • Returns the major radius of the hyperbola. It is the radius on the ‘XAxis’ of the hyperbola.
    rtype

    float

MinorRadius()
  • Returns the minor radius of the hyperbola. It is the radius on the ‘YAxis’ of the hyperbola.
    rtype

    float

Mirror()
Parameters

P

type P

gp_Pnt

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of an hyperbola with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt

    rtype

    gp_Hypr* Performs the symmetrical transformation of an hyperbola with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax1

    rtype

    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).

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Hypr

OtherBranch()
  • Returns the branch of hyperbola obtained by doing the symmetrical transformation of <self> with respect to the ‘YAxis’ of <self>.
    rtype

    gp_Hypr

Parameter()
  • Returns p = (e * e - 1) * MajorRadius where e is the eccentricity of the hyperbola. Raises DomainError if MajorRadius = 0.0
    rtype

    float

Position()
  • Returns the coordinate system of the hyperbola.
    rtype

    gp_Ax2

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates an hyperbola. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Hypr

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

Scaled()
  • Scales an hyperbola. S is the scaling value.
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Hypr

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.
    param A1

    type A1

    gp_Ax1

    rtype

    None

SetLocation()
  • Modifies this hyperbola, by redefining its local coordinate system so that its origin becomes P.
    param P

    type P

    gp_Pnt

    rtype

    None

SetMajorRadius()
  • Modifies the major radius of this hyperbola. Exceptions Standard_ConstructionError if MajorRadius is negative.
    param MajorRadius

    type MajorRadius

    float

    rtype

    None

SetMinorRadius()
  • Modifies the minor radius of this hyperbola. Exceptions Standard_ConstructionError if MinorRadius is negative.
    param MinorRadius

    type MinorRadius

    float

    rtype

    None

SetPosition()
  • Modifies this hyperbola, by redefining its local coordinate system so that it becomes A2.
    param A2

    type A2

    gp_Ax2

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf

rtype

None

Transformed()
  • Transforms an hyperbola with the transformation T from class Trsf.
    param T

    type T

    gp_Trsf

    rtype

    gp_Hypr

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates an hyperbola in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec

    rtype

    gp_Hypr* Translates an hyperbola from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Hypr

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.
    rtype

    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
    rtype

    gp_Ax1

property thisown

The membership flag

class gp_Hypr2d(*args)

Bases: object

  • Creates of an indefinite hyperbola.
    rtype

    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

    param MajorAxis

    type MajorAxis

    gp_Ax2d

    param MajorRadius

    type MajorRadius

    float

    param MinorRadius

    type MinorRadius

    float

    param Sense

    default value is Standard_True

    type Sense

    bool

    rtype

    None* 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

    param A

    type A

    gp_Ax22d

    param MajorRadius

    type MajorRadius

    float

    param MinorRadius

    type MinorRadius

    float

    rtype

    None

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
    rtype

    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
    rtype

    gp_Ax2d

Axis()
  • Returns the axisplacement of the hyperbola.
    rtype

    gp_Ax22d

Coefficients()
  • Computes the coefficients of the implicit equation of the hyperbolaA * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.
    param A

    type A

    float

    param B

    type B

    float

    param C

    type C

    float

    param D

    type D

    float

    param E

    type E

    float

    param F

    type F

    float

    rtype

    None

ConjugateBranch1()
  • Computes the branch of hyperbola which is on the positive side of the ‘YAxis’ of <self>.
    rtype

    gp_Hypr2d

ConjugateBranch2()
  • Computes the branch of hyperbola which is on the negative side of the ‘YAxis’ of <self>.
    rtype

    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’.
    rtype

    gp_Ax2d

Directrix2()
  • This line is obtained by the symmetrical transformation of ‘Directrix1’ with respect to the ‘YAxis’ of the hyperbola.
    rtype

    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.
    rtype

    float

Focal()
  • Computes the focal distance. It is the distance between the ‘Location’ of the hyperbola and ‘Focus1’ or ‘Focus2’.
    rtype

    float

Focus1()
  • Returns the first focus of the hyperbola. This focus is on the positive side of the ‘XAxis’ of the hyperbola.
    rtype

    gp_Pnt2d

Focus2()
  • Returns the second focus of the hyperbola. This focus is on the negative side of the ‘XAxis’ of the hyperbola.
    rtype

    gp_Pnt2d

IsDirect()
  • Returns true if the local coordinate system is direct and false in the other case.
    rtype

    bool

Location()
  • Returns the location point of the hyperbola. It is the intersection point between the ‘XAxis’ and the ‘YAxis’.
    rtype

    gp_Pnt2d

MajorRadius()
  • Returns the major radius of the hyperbola (it is the radius corresponding to the ‘XAxis’ of the hyperbola).
    rtype

    float

MinorRadius()
  • Returns the minor radius of the hyperbola (it is the radius corresponding to the ‘YAxis’ of the hyperbola).
    rtype

    float

Mirror()
Parameters

P

type P

gp_Pnt2d

rtype

None:param A:

type A

gp_Ax2d

rtype

None

Mirrored()
  • Performs the symmetrical transformation of an hyperbola with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt2d

    rtype

    gp_Hypr2d* Performs the symmetrical transformation of an hyperbola with respect to an axis placement which is the axis of the symmetry.

    param A

    type A

    gp_Ax2d

    rtype

    gp_Hypr2d

OtherBranch()
  • Returns the branch of hyperbola obtained by doing the symmetrical transformation of <self> with respect to the ‘YAxis’ of <self>.
    rtype

    gp_Hypr2d

Parameter()
  • Returns p = (e * e - 1) * MajorRadius where e is the eccentricity of the hyperbola. Raises DomainError if MajorRadius = 0.0
    rtype

    float

Reverse()
Return type

None

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.
    rtype

    gp_Hypr2d

Rotate()
Parameters

P

type P

gp_Pnt2d

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates an hyperbola. P is the center of the rotation. Ang is the angular value of the rotation in radians.
    param P

    type P

    gp_Pnt2d

    param Ang

    type Ang

    float

    rtype

    gp_Hypr2d

Scale()
Parameters

P

type P

gp_Pnt2d

param S

type S

float

rtype

None

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.
    param P

    type P

    gp_Pnt2d

    param S

    type S

    float

    rtype

    gp_Hypr2d

SetAxis()
  • Modifies this hyperbola, by redefining its local coordinate system so that it becomes A.
    param A

    type A

    gp_Ax22d

    rtype

    None

SetLocation()
  • Modifies this hyperbola, by redefining its local coordinate system so that its origin becomes P.
    param P

    type P

    gp_Pnt2d

    rtype

    None

SetMajorRadius()
  • Modifies the major or minor radius of this hyperbola. Exceptions Standard_ConstructionError if MajorRadius or MinorRadius is negative.
    param MajorRadius

    type MajorRadius

    float

    rtype

    None

SetMinorRadius()
  • Modifies the major or minor radius of this hyperbola. Exceptions Standard_ConstructionError if MajorRadius or MinorRadius is negative.
    param MinorRadius

    type MinorRadius

    float

    rtype

    None

SetXAxis()
  • Changes the major axis of the hyperbola. The minor axis is recomputed and the location of the hyperbola too.
    param A

    type A

    gp_Ax2d

    rtype

    None

SetYAxis()
  • Changes the minor axis of the hyperbola.The minor axis is recomputed and the location of the hyperbola too.
    param A

    type A

    gp_Ax2d

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf2d

rtype

None

Transformed()
  • Transforms an hyperbola with the transformation T from class Trsf2d.
    param T

    type T

    gp_Trsf2d

    rtype

    gp_Hypr2d

Translate()
Parameters

V

type V

gp_Vec2d

rtype

None:param P1:

type P1

gp_Pnt2d

param P2

type P2

gp_Pnt2d

rtype

None

Translated()
  • Translates an hyperbola in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec2d

    rtype

    gp_Hypr2d* Translates an hyperbola from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt2d

    param P2

    type P2

    gp_Pnt2d

    rtype

    gp_Hypr2d

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.
    rtype

    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.
    rtype

    gp_Ax2d

property thisown

The membership flag

class gp_Lin(*args)

Bases: object

  • Creates a Line corresponding to Z axis of the reference coordinate system.
    rtype

    None* Creates a line defined by axis A1.

    param A1

    type A1

    gp_Ax1

    rtype

    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).

    param P

    type P

    gp_Pnt

    param V

    type V

    gp_Dir

    rtype

    None

Angle()
  • Computes the angle between two lines in radians.
    param Other

    type Other

    gp_Lin

    rtype

    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..
    param P

    type P

    gp_Pnt

    param LinearTolerance

    type LinearTolerance

    float

    rtype

    bool

Direction()
  • Returns the direction of the line.
    rtype

    gp_Dir

Distance()
  • Computes the distance between <self> and the point P.
    param P

    type P

    gp_Pnt

    rtype

    float* Computes the distance between two lines.

    param Other

    type Other

    gp_Lin

    rtype

    float

Location()
  • Returns the location point (origin) of the line.
    rtype

    gp_Pnt

Mirror()
Parameters

P

type P

gp_Pnt

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a line with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt

    rtype

    gp_Lin* Performs the symmetrical transformation of a line with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax1

    rtype

    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).

    param A2

    type A2

    gp_Ax2

    rtype

    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.
    param P

    type P

    gp_Pnt

    rtype

    gp_Lin

Position()
  • Returns the axis placement one axis whith the same location and direction as <self>.
    rtype

    gp_Ax1

Reverse()
Return type

None

Reversed()
  • Reverses the direction of the line. Note: - Reverse assigns the result to this line, while - Reversed creates a new one.
    rtype

    gp_Lin

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a line. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Lin

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

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.
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Lin

SetDirection()
  • Changes the direction of the line.
    param V

    type V

    gp_Dir

    rtype

    None

SetLocation()
  • Changes the location point (origin) of the line.
    param P

    type P

    gp_Pnt

    rtype

    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.
    param A1

    type A1

    gp_Ax1

    rtype

    None

SquareDistance()
  • Computes the square distance between <self> and the point P.
    param P

    type P

    gp_Pnt

    rtype

    float* Computes the square distance between two lines.

    param Other

    type Other

    gp_Lin

    rtype

    float

Transform()
Parameters

T

type T

gp_Trsf

rtype

None

Transformed()
  • Transforms a line with the transformation T from class Trsf.
    param T

    type T

    gp_Trsf

    rtype

    gp_Lin

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates a line in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec

    rtype

    gp_Lin* Translates a line from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Lin

property thisown

The membership flag

class gp_Lin2d(*args)

Bases: object

  • Creates a Line corresponding to X axis of the reference coordinate system.
    rtype

    None* Creates a line located with A.

    param A

    type A

    gp_Ax2d

    rtype

    None* <P> is the location point (origin) of the line and <V> is the direction of the line.

    param P

    type P

    gp_Pnt2d

    param V

    type V

    gp_Dir2d

    rtype

    None* 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.

    param A

    type A

    float

    param B

    type B

    float

    param C

    type C

    float

    rtype

    None

Angle()
  • Computes the angle between two lines in radians.
    param Other

    type Other

    gp_Lin2d

    rtype

    float

Coefficients()
  • Returns the normalized coefficients of the lineA * X + B * Y + C = 0.
    param A

    type A

    float

    param B

    type B

    float

    param C

    type C

    float

    rtype

    None

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.
    param P

    type P

    gp_Pnt2d

    param LinearTolerance

    type LinearTolerance

    float

    rtype

    bool

Direction()
  • Returns the direction of the line.
    rtype

    gp_Dir2d

Distance()
  • Computes the distance between <self> and the point <P>.
    param P

    type P

    gp_Pnt2d

    rtype

    float* Computes the distance between two lines.

    param Other

    type Other

    gp_Lin2d

    rtype

    float

Location()
  • Returns the location point (origin) of the line.
    rtype

    gp_Pnt2d

Mirror()
Parameters

P

type P

gp_Pnt2d

rtype

None:param A:

type A

gp_Ax2d

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a line with respect to the point <P> which is the center of the symmetry
    param P

    type P

    gp_Pnt2d

    rtype

    gp_Lin2d* Performs the symmetrical transformation of a line with respect to an axis placement which is the axis of the symmetry.

    param A

    type A

    gp_Ax2d

    rtype

    gp_Lin2d

Normal()
  • Computes the line normal to the direction of <self>, passing through the point <P>.
    param P

    type P

    gp_Pnt2d

    rtype

    gp_Lin2d

Position()
  • Returns the axis placement one axis whith the same location and direction as <self>.
    rtype

    gp_Ax2d

Reverse()
Return type

None

Reversed()
  • Reverses the positioning axis of this line. Note: - Reverse assigns the result to this line, while - Reversed creates a new one.
    rtype

    gp_Lin2d

Rotate()
Parameters

P

type P

gp_Pnt2d

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a line. P is the center of the rotation. Ang is the angular value of the rotation in radians.
    param P

    type P

    gp_Pnt2d

    param Ang

    type Ang

    float

    rtype

    gp_Lin2d

Scale()
Parameters

P

type P

gp_Pnt2d

param S

type S

float

rtype

None

Scaled()
  • Scales a line. S is the scaling value. Only the origin of the line is modified.
    param P

    type P

    gp_Pnt2d

    param S

    type S

    float

    rtype

    gp_Lin2d

SetDirection()
  • Changes the direction of the line.
    param V

    type V

    gp_Dir2d

    rtype

    None

SetLocation()
  • Changes the origin of the line.
    param P

    type P

    gp_Pnt2d

    rtype

    None

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.
    param A

    type A

    gp_Ax2d

    rtype

    None

SquareDistance()
  • Computes the square distance between <self> and the point <P>.
    param P

    type P

    gp_Pnt2d

    rtype

    float* Computes the square distance between two lines.

    param Other

    type Other

    gp_Lin2d

    rtype

    float

Transform()
Parameters

T

type T

gp_Trsf2d

rtype

None

Transformed()
  • Transforms a line with the transformation T from class Trsf2d.
    param T

    type T

    gp_Trsf2d

    rtype

    gp_Lin2d

Translate()
Parameters

V

type V

gp_Vec2d

rtype

None:param P1:

type P1

gp_Pnt2d

param P2

type P2

gp_Pnt2d

rtype

None

Translated()
  • Translates a line in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec2d

    rtype

    gp_Lin2d* Translates a line from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt2d

    param P2

    type P2

    gp_Pnt2d

    rtype

    gp_Lin2d

property thisown

The membership flag

class gp_Mat(*args)

Bases: object

  • creates a matrix with null coefficients.
    rtype

    None:param a11:

    type a11

    float

    param a12

    type a12

    float

    param a13

    type a13

    float

    param a21

    type a21

    float

    param a22

    type a22

    float

    param a23

    type a23

    float

    param a31

    type a31

    float

    param a32

    type a32

    float

    param a33

    type a33

    float

    rtype

    None* Creates a matrix. Col1, Col2, Col3 are the 3 columns of the matrix.

    param Col1

    type Col1

    gp_XYZ

    param Col2

    type Col2

    gp_XYZ

    param Col3

    type Col3

    gp_XYZ

    rtype

    None

Add()
Parameters

Other

type Other

gp_Mat

rtype

None

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)
    param Other

    type Other

    gp_Mat

    rtype

    gp_Mat

Column()
  • Returns the column of Col index. Raises OutOfRange if Col < 1 or Col > 3
    param Col

    type Col

    int

    rtype

    gp_XYZ

Determinant()
  • Computes the determinant of the matrix.
    rtype

    float

Diagonal()
  • Returns the main diagonal of the matrix.
    rtype

    gp_XYZ

Divide()
Parameters

Scalar

type Scalar

float

rtype

None

Divided()
  • Divides all the coefficients of the matrix by Scalar
    param Scalar

    type Scalar

    float

    rtype

    gp_Mat

DumpJsonToString(gp_Mat self, int depth=-1) → std::string
GetChangeValue(gp_Mat self, Standard_Integer const Row, Standard_Integer const Col) → Standard_Real
Invert()
Return type

None

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.
    rtype

    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.
    rtype

    bool

Multiplied()
  • Computes the product of two matrices <self> * <Other>
    param Other

    type Other

    gp_Mat

    rtype

    gp_Mat:param Scalar:

    type Scalar

    float

    rtype

    gp_Mat

Multiply()
  • Computes the product of two matrices <self> = <Other> * <self>.
    param Other

    type Other

    gp_Mat

    rtype

    None* Multiplies all the coefficients of the matrix by Scalar

    param Scalar

    type Scalar

    float

    rtype

    None

Power()
Parameters

N

type N

int

rtype

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
    param N

    type N

    int

    rtype

    gp_Mat

PreMultiply()
Parameters

Other

type Other

gp_Mat

rtype

None

Row()
  • returns the row of Row index. Raises OutOfRange if Row < 1 or Row > 3
    param Row

    type Row

    int

    rtype

    gp_XYZ

SetChangeValue(gp_Mat self, Standard_Integer const Row, Standard_Integer const Col, Standard_Real value)
SetCol()
  • Assigns the three coordinates of Value to the column of index Col of this matrix. Raises OutOfRange if Col < 1 or Col > 3.
    param Col

    type Col

    int

    param Value

    type Value

    gp_XYZ

    rtype

    None

SetCols()
  • Assigns the number triples Col1, Col2, Col3 to the three columns of this matrix.
    param Col1

    type Col1

    gp_XYZ

    param Col2

    type Col2

    gp_XYZ

    param Col3

    type Col3

    gp_XYZ

    rtype

    None

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 anti-symmetric.
    param Ref

    type Ref

    gp_XYZ

    rtype

    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.
    param X1

    type X1

    float

    param X2

    type X2

    float

    param X3

    type X3

    float

    rtype

    None

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.
    param Ref

    type Ref

    gp_XYZ

    rtype

    None

SetIdentity()
  • Modifies this matrix so that it represents the Identity matrix.
    rtype

    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()
    param Axis

    type Axis

    gp_XYZ

    param Ang

    type Ang

    float

    rtype

    None

SetRow()
  • Assigns the three coordinates of Value to the row of index Row of this matrix. Raises OutOfRange if Row < 1 or Row > 3.
    param Row

    type Row

    int

    param Value

    type Value

    gp_XYZ

    rtype

    None

SetRows()
  • Assigns the number triples Row1, Row2, Row3 to the three rows of this matrix.
    param Row1

    type Row1

    gp_XYZ

    param Row2

    type Row2

    gp_XYZ

    param Row3

    type Row3

    gp_XYZ

    rtype

    None

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 |
    param S

    type S

    float

    rtype

    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
    param Row

    type Row

    int

    param Col

    type Col

    int

    param Value

    type Value

    float

    rtype

    None

Subtract()
Parameters

Other

type Other

gp_Mat

rtype

None

Subtracted()
  • cOmputes for each coefficient of the matrix<self>.Coef(i,j) - <Other>.Coef(i,j)
    param Other

    type Other

    gp_Mat

    rtype

    gp_Mat

Transpose()
Return type

None

Transposed()
  • Transposes the matrix. A(j, i) -> A (i, j)
    rtype

    gp_Mat

Value()
  • Returns the coefficient of range (Row, Col) Raises OutOfRange if Row < 1 or Row > 3 or Col < 1 or Col > 3
    param Row

    type Row

    int

    param Col

    type Col

    int

    rtype

    float

property thisown

The membership flag

class gp_Mat2d(*args)

Bases: object

  • Creates a matrix with null coefficients.
    rtype

    None* Col1, Col2 are the 2 columns of the matrix.

    param Col1

    type Col1

    gp_XY

    param Col2

    type Col2

    gp_XY

    rtype

    None

Add()
Parameters

Other

type Other

gp_Mat2d

rtype

None

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.
    param Other

    type Other

    gp_Mat2d

    rtype

    gp_Mat2d

Column()
  • Returns the column of Col index. Raises OutOfRange if Col < 1 or Col > 2
    param Col

    type Col

    int

    rtype

    gp_XY

Determinant()
  • Computes the determinant of the matrix.
    rtype

    float

Diagonal()
  • Returns the main diagonal of the matrix.
    rtype

    gp_XY

Divide()
Parameters

Scalar

type Scalar

float

rtype

None

Divided()
  • Divides all the coefficients of the matrix by a scalar.
    param Scalar

    type Scalar

    float

    rtype

    gp_Mat2d

GetChangeValue(gp_Mat2d self, Standard_Integer const Row, Standard_Integer const Col) → Standard_Real
Invert()
Return type

None

Inverted()
  • Inverses the matrix and raises exception if the matrix is singular.
    rtype

    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.
    rtype

    bool

Multiplied()
Parameters

Other

type Other

gp_Mat2d

rtype

gp_Mat2d:param Scalar:

type Scalar

float

rtype

gp_Mat2d

Multiply()
  • Computes the product of two matrices <self> * <Other>
    param Other

    type Other

    gp_Mat2d

    rtype

    None* Multiplies all the coefficients of the matrix by a scalar.

    param Scalar

    type Scalar

    float

    rtype

    None

Power()
Parameters

N

type N

int

rtype

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
    param N

    type N

    int

    rtype

    gp_Mat2d

PreMultiply()
  • Modifies this matrix by premultiplying it by the matrix Other <self> = Other * <self>.
    param Other

    type Other

    gp_Mat2d

    rtype

    None

Row()
  • Returns the row of index Row. Raised if Row < 1 or Row > 2
    param Row

    type Row

    int

    rtype

    gp_XY

SetChangeValue(gp_Mat2d self, Standard_Integer const Row, Standard_Integer const Col, Standard_Real value)
SetCol()
  • Assigns the two coordinates of Value to the column of range Col of this matrix Raises OutOfRange if Col < 1 or Col > 2.
    param Col

    type Col

    int

    param Value

    type Value

    gp_XY

    rtype

    None

SetCols()
  • Assigns the number pairs Col1, Col2 to the two columns of this matrix
    param Col1

    type Col1

    gp_XY

    param Col2

    type Col2

    gp_XY

    rtype

    None

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.
    param X1

    type X1

    float

    param X2

    type X2

    float

    rtype

    None

SetIdentity()
  • Modifies this matrix, so that it represents the Identity matrix.
    rtype

    None

SetRotation()
  • Modifies this matrix, so that it representso a rotation. Ang is the angular value in radian of the rotation.
    param Ang

    type Ang

    float

    rtype

    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.
    param Row

    type Row

    int

    param Value

    type Value

    gp_XY

    rtype

    None

SetRows()
  • Assigns the number pairs Row1, Row2 to the two rows of this matrix.
    param Row1

    type Row1

    gp_XY

    param Row2

    type Row2

    gp_XY

    rtype

    None

SetScale()
  • Modifies the matrix such that it represents a scaling transformation, where S is the scale factor| S 0.0 | <self> = | 0.0 S |
    param S

    type S

    float

    rtype

    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
    param Row

    type Row

    int

    param Col

    type Col

    int

    param Value

    type Value

    float

    rtype

    None

Subtract()
Parameters

Other

type Other

gp_Mat2d

rtype

None

Subtracted()
  • Computes for each coefficient of the matrix<self>.Coef(i,j) - <Other>.Coef(i,j)
    param Other

    type Other

    gp_Mat2d

    rtype

    gp_Mat2d

Transpose()
Return type

None

Transposed()
  • Transposes the matrix. A(j, i) -> A (i, j)
    rtype

    gp_Mat2d

Value()
  • Returns the coefficient of range (Row, Col) Raises OutOfRange if Row < 1 or Row > 2 or Col < 1 or Col > 2
    param Row

    type Row

    int

    param Col

    type Col

    int

    rtype

    float

property thisown

The membership flag

class gp_Parab(*args)

Bases: object

  • Creates an indefinite Parabola.
    rtype

    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

    param A2

    type A2

    gp_Ax2

    param Focal

    type Focal

    float

    rtype

    None* 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.

    param D

    type D

    gp_Ax1

    param F

    type F

    gp_Pnt

    rtype

    None

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.
    rtype

    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.
    rtype

    gp_Ax1

Focal()
  • Returns the distance between the vertex and the focus of the parabola.
    rtype

    float

Focus()
    • Computes the focus of the parabola.
      rtype

      gp_Pnt

Location()
  • Returns the vertex of the parabola. It is the ‘Location’ point of the coordinate system of the parabola.
    rtype

    gp_Pnt

Mirror()
Parameters

P

type P

gp_Pnt

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a parabola with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt

    rtype

    gp_Parab* Performs the symmetrical transformation of a parabola with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax1

    rtype

    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).

    param A2

    type A2

    gp_Ax2

    rtype

    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.
    rtype

    float

Position()
  • Returns the local coordinate system of the parabola.
    rtype

    gp_Ax2

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a parabola. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Parab

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

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.
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Parab

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.
    param A1

    type A1

    gp_Ax1

    rtype

    None

SetFocal()
  • Changes the focal distance of the parabola. Raises ConstructionError if Focal < 0.0
    param Focal

    type Focal

    float

    rtype

    None

SetLocation()
  • Changes the location of the parabola. It is the vertex of the parabola.
    param P

    type P

    gp_Pnt

    rtype

    None

SetPosition()
  • Changes the local coordinate system of the parabola.
    param A2

    type A2

    gp_Ax2

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf

rtype

None

Transformed()
  • Transforms a parabola with the transformation T from class Trsf.
    param T

    type T

    gp_Trsf

    rtype

    gp_Parab

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates a parabola in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec

    rtype

    gp_Parab* Translates a parabola from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Parab

XAxis()
  • Returns the symmetry axis of the parabola. The location point of the axis is the vertex of the parabola.
    rtype

    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.
    rtype

    gp_Ax1

property thisown

The membership flag

class gp_Parab2d(*args)

Bases: object

  • Creates an indefinite parabola.
    rtype

    None* Creates a parabola with its vertex point, its axis of symmetry (‘XAxis’) and its focal length. The sense of parametrization is given by theSense. If theSense == True (by default) then right-handed coordinate system is used, otherwise - left-handed. Warnings : It is possible to have FocalLength = 0. In this case, the parabola looks like a line, which is parallel to the symmetry-axis. Raises ConstructionError if FocalLength < 0.0

    param theMirrorAxis

    type theMirrorAxis

    gp_Ax2d

    param theFocalLength

    type theFocalLength

    float

    param theSense

    default value is Standard_True

    type theSense

    bool

    rtype

    None* Creates a parabola with its vertex point, its axis of symmetry (‘XAxis’), correspond Y-axis and its focal length. Warnings : It is possible to have FocalLength = 0. In this case, the parabola looks like a line, which is parallel to the symmetry-axis. Raises ConstructionError if Focal < 0.0

    param theAxes

    type theAxes

    gp_Ax22d

    param theFocalLength

    type theFocalLength

    float

    rtype

    None* Creates a parabola with the directrix and the focus point. Y-axis of the parabola (in User Coordinate System - UCS) is the direction of theDirectrix. X-axis always directs from theDirectrix to theFocus point and always comes through theFocus. Apex of the parabola is a middle point between the theFocus and the intersection point of theDirectrix and the X-axis. Warnings : It is possible to have FocalLength = 0 (when theFocus lies in theDirectrix). In this case, X-direction of the parabola is defined by theSense parameter. If theSense == True (by default) then right-handed coordinate system is used, otherwise - left-handed. Result parabola will look like a line, which is perpendicular to the directrix.

    param theDirectrix

    type theDirectrix

    gp_Ax2d

    param theFocus

    type theFocus

    gp_Pnt2d

    param theSense

    default value is Standard_True

    type theSense

    bool

    rtype

    None

Axis()
  • Returns the local coordinate system of the parabola. The ‘Location’ point of this axis is the vertex of the parabola.
    rtype

    gp_Ax22d

Coefficients()
  • Computes the coefficients of the implicit equation of the parabola (in WCS - World Coordinate System). A * (X**2) + B * (Y**2) + 2*C*(X*Y) + 2*D*X + 2*E*Y + F = 0.
    param A

    type A

    float

    param B

    type B

    float

    param C

    type C

    float

    param D

    type D

    float

    param E

    type E

    float

    param F

    type F

    float

    rtype

    None

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.
    rtype

    gp_Ax2d

Focal()
  • Returns the distance between the vertex and the focus of the parabola.
    rtype

    float

Focus()
  • Returns the focus of the parabola.
    rtype

    gp_Pnt2d

IsDirect()
  • Returns true if the local coordinate system is direct and false in the other case.
    rtype

    bool

Location()
  • Returns the vertex of the parabola.
    rtype

    gp_Pnt2d

Mirror()
Parameters

P

type P

gp_Pnt2d

rtype

None:param A:

type A

gp_Ax2d

rtype

None

MirrorAxis()
  • Returns the symmetry axis of the parabola. The ‘Location’ point of this axis is the vertex of the parabola.
    rtype

    gp_Ax2d

Mirrored()
  • Performs the symmetrical transformation of a parabola with respect to the point P which is the center of the symmetry
    param P

    type P

    gp_Pnt2d

    rtype

    gp_Parab2d* Performs the symmetrical transformation of a parabola with respect to an axis placement which is the axis of the symmetry.

    param A

    type A

    gp_Ax2d

    rtype

    gp_Parab2d

Parameter()
  • Returns the distance between the focus and the directrix of the parabola.
    rtype

    float

Reverse()
Return type

None

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.
    rtype

    gp_Parab2d

Rotate()
Parameters

P

type P

gp_Pnt2d

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a parabola. P is the center of the rotation. Ang is the angular value of the rotation in radians.
    param P

    type P

    gp_Pnt2d

    param Ang

    type Ang

    float

    rtype

    gp_Parab2d

Scale()
Parameters

P

type P

gp_Pnt2d

param S

type S

float

rtype

None

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.
    param P

    type P

    gp_Pnt2d

    param S

    type S

    float

    rtype

    gp_Parab2d

SetAxis()
  • Changes the local coordinate system of the parabola. The ‘Location’ point of A becomes the vertex of the parabola.
    param A

    type A

    gp_Ax22d

    rtype

    None

SetFocal()
  • Changes the focal distance of the parabola WarningsIt is possible to have Focal = 0. Raises ConstructionError if Focal < 0.0
    param Focal

    type Focal

    float

    rtype

    None

SetLocation()
  • Changes the ‘Location’ point of the parabola. It is the vertex of the parabola.
    param P

    type P

    gp_Pnt2d

    rtype

    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.
    param A

    type A

    gp_Ax2d

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf2d

rtype

None

Transformed()
  • Transforms an parabola with the transformation T from class Trsf2d.
    param T

    type T

    gp_Trsf2d

    rtype

    gp_Parab2d

Translate()
Parameters

V

type V

gp_Vec2d

rtype

None:param P1:

type P1

gp_Pnt2d

param P2

type P2

gp_Pnt2d

rtype

None

Translated()
  • Translates a parabola in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec2d

    rtype

    gp_Parab2d* Translates a parabola from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt2d

    param P2

    type P2

    gp_Pnt2d

    rtype

    gp_Parab2d

property thisown

The membership flag

class gp_Pln(*args)

Bases: object

  • Creates a plane coincident with OXY plane of the reference coordinate system.
    rtype

    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.

    param A3

    type A3

    gp_Ax3

    rtype

    None* Creates a plane with the ‘Location’ point <P> and the normal direction <V>.

    param P

    type P

    gp_Pnt

    param V

    type V

    gp_Dir

    rtype

    None* 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.

    param A

    type A

    float

    param B

    type B

    float

    param C

    type C

    float

    param D

    type D

    float

    rtype

    None

Axis()
  • Returns the plane’s normal Axis.
    rtype

    gp_Ax1

Coefficients()
  • Returns the coefficients of the plane’s cartesian equationA * X + B * Y + C * Z + D = 0.
    param A

    type A

    float

    param B

    type B

    float

    param C

    type C

    float

    param D

    type D

    float

    rtype

    None

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.
    param P

    type P

    gp_Pnt

    param LinearTolerance

    type LinearTolerance

    float

    rtype

    bool* 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.

    param L

    type L

    gp_Lin

    param LinearTolerance

    type LinearTolerance

    float

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

Direct()
  • returns true if the Ax3 is right handed.
    rtype

    bool

Distance()
  • Computes the distance between <self> and the point <P>.
    param P

    type P

    gp_Pnt

    rtype

    float* Computes the distance between <self> and the line <L>.

    param L

    type L

    gp_Lin

    rtype

    float* Computes the distance between two planes.

    param Other

    type Other

    gp_Pln

    rtype

    float

Location()
  • Returns the plane’s location (origin).
    rtype

    gp_Pnt

Mirror()
Parameters

P

type P

gp_Pnt

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a plane with respect to the point <P> which is the center of the symmetry WarningsThe normal direction to the plane is not changed. The ‘XAxis’ and the ‘YAxis’ are reversed.
    param P

    type P

    gp_Pnt

    rtype

    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.

    param A1

    type A1

    gp_Ax1

    rtype

    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.

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Pln

Position()
  • Returns the local coordinate system of the plane .
    rtype

    gp_Ax3

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • rotates a plane. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Pln

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

Scaled()
  • Scales a plane. S is the scaling value.
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Pln

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.
    param A1

    type A1

    gp_Ax1

    rtype

    None

SetLocation()
  • Changes the origin of the plane.
    param Loc

    type Loc

    gp_Pnt

    rtype

    None

SetPosition()
  • Changes the local coordinate system of the plane.
    param A3

    type A3

    gp_Ax3

    rtype

    None

SquareDistance()
  • Computes the square distance between <self> and the point <P>.
    param P

    type P

    gp_Pnt

    rtype

    float* Computes the square distance between <self> and the line <L>.

    param L

    type L

    gp_Lin

    rtype

    float* Computes the square distance between two planes.

    param Other

    type Other

    gp_Pln

    rtype

    float

Transform()
Parameters

T

type T

gp_Trsf

rtype

None

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.
    param T

    type T

    gp_Trsf

    rtype

    gp_Pln

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates a plane in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec

    rtype

    gp_Pln* Translates a plane from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Pln

UReverse()
  • Reverses the U parametrization of the plane reversing the XAxis.
    rtype

    None

VReverse()
  • Reverses the V parametrization of the plane reversing the YAxis.
    rtype

    None

XAxis()
  • Returns the X axis of the plane.
    rtype

    gp_Ax1

YAxis()
  • Returns the Y axis of the plane.
    rtype

    gp_Ax1

property thisown

The membership flag

class gp_Pnt(*args)

Bases: object

  • Creates a point with zero coordinates.
    rtype

    None* Creates a point from a XYZ object.

    param Coord

    type Coord

    gp_XYZ

    rtype

    None* Creates a point with its 3 cartesian’s coordinates : Xp, Yp, Zp.

    param Xp

    type Xp

    float

    param Yp

    type Yp

    float

    param Zp

    type Zp

    float

    rtype

    None

BaryCenter()
  • Assigns the result of the following expression to this point (Alpha*this + Beta*P) / (Alpha + Beta)
    param Alpha

    type Alpha

    float

    param P

    type P

    gp_Pnt

    param Beta

    type Beta

    float

    rtype

    None

ChangeCoord()
  • Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.
    rtype

    gp_XYZ

Coord()
  • Returns the coordinate of corresponding to the value of IndexIndex = 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}.
    param Index

    type Index

    int

    rtype

    float* For this point gives its three coordinates Xp, Yp and Zp.

    param Xp

    type Xp

    float

    param Yp

    type Yp

    float

    param Zp

    type Zp

    float

    rtype

    None* For this point, returns its three coordinates as a XYZ object.

    rtype

    gp_XYZ

Distance()
  • Computes the distance between two points.
    param Other

    type Other

    gp_Pnt

    rtype

    float

IsEqual()
  • Comparison Returns True if the distance between the two points is lower or equal to LinearTolerance.
    param Other

    type Other

    gp_Pnt

    param LinearTolerance

    type LinearTolerance

    float

    rtype

    bool

Mirror()
  • Performs the symmetrical transformation of a point with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt

    rtype

    None:param A1:

    type A1

    gp_Ax1

    rtype

    None:param A2:

    type A2

    gp_Ax2

    rtype

    None

Mirrored()
  • Performs the symmetrical transformation of a point with respect to an axis placement which is the axis of the symmetry.
    param P

    type P

    gp_Pnt

    rtype

    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).

    param A1

    type A1

    gp_Ax1

    rtype

    gp_Pnt* Rotates a point. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Pnt

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Scales a point. S is the scaling value.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Pnt

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

Scaled()
  • Transforms a point with the transformation T.
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Pnt

SetCoord()
  • Changes the coordinate of range IndexIndex = 1 => X is modified Index = 2 => Y is modified Index = 3 => Z is modified Raised if Index != {1, 2, 3}.
    param Index

    type Index

    int

    param Xi

    type Xi

    float

    rtype

    None* For this point, assigns the values Xp, Yp and Zp to its three coordinates.

    param Xp

    type Xp

    float

    param Yp

    type Yp

    float

    param Zp

    type Zp

    float

    rtype

    None

SetX()
  • Assigns the given value to the X coordinate of this point.
    param X

    type X

    float

    rtype

    None

SetXYZ()
  • Assigns the three coordinates of Coord to this point.
    param Coord

    type Coord

    gp_XYZ

    rtype

    None

SetY()
  • Assigns the given value to the Y coordinate of this point.
    param Y

    type Y

    float

    rtype

    None

SetZ()
  • Assigns the given value to the Z coordinate of this point.
    param Z

    type Z

    float

    rtype

    None

SquareDistance()
  • Computes the square distance between two points.
    param Other

    type Other

    gp_Pnt

    rtype

    float

Transform()
Parameters

T

type T

gp_Trsf

rtype

None

Transformed()
  • Translates a point in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param T

    type T

    gp_Trsf

    rtype

    gp_Pnt

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates a point from the point P1 to the point P2.
    param V

    type V

    gp_Vec

    rtype

    gp_Pnt:param P1:

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Pnt

X()
  • For this point, returns its X coordinate.
    rtype

    float

XYZ()
  • For this point, returns its three coordinates as a XYZ object.
    rtype

    gp_XYZ

Y()
  • For this point, returns its Y coordinate.
    rtype

    float

Z()
  • For this point, returns its Z coordinate.
    rtype

    float

property thisown

The membership flag

class gp_Pnt2d(*args)

Bases: object

  • Creates a point with zero coordinates.
    rtype

    None* Creates a point with a doublet of coordinates.

    param Coord

    type Coord

    gp_XY

    rtype

    None* Creates a point with its 2 cartesian’s coordinates : Xp, Yp.

    param Xp

    type Xp

    float

    param Yp

    type Yp

    float

    rtype

    None

ChangeCoord()
  • Returns the coordinates of this point. Note: This syntax allows direct modification of the returned value.
    rtype

    gp_XY

Coord()
  • Returns the coordinate of range IndexIndex = 1 => X is returned Index = 2 => Y is returned Raises OutOfRange if Index != {1, 2}.
    param Index

    type Index

    int

    rtype

    float* For this point returns its two coordinates as a number pair.

    param Xp

    type Xp

    float

    param Yp

    type Yp

    float

    rtype

    None* For this point, returns its two coordinates as a number pair.

    rtype

    gp_XY

Distance()
  • Computes the distance between two points.
    param Other

    type Other

    gp_Pnt2d

    rtype

    float

IsEqual()
  • Comparison Returns True if the distance between the two points is lower or equal to LinearTolerance.
    param Other

    type Other

    gp_Pnt2d

    param LinearTolerance

    type LinearTolerance

    float

    rtype

    bool

Mirror()
  • Performs the symmetrical transformation of a point with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt2d

    rtype

    None:param A:

    type A

    gp_Ax2d

    rtype

    None

Mirrored()
  • Performs the symmetrical transformation of a point with respect to an axis placement which is the axis
    param P

    type P

    gp_Pnt2d

    rtype

    gp_Pnt2d* Rotates a point. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.

    param A

    type A

    gp_Ax2d

    rtype

    gp_Pnt2d

Rotate()
Parameters

P

type P

gp_Pnt2d

param Ang

type Ang

float

rtype

None

Rotated()
  • Scales a point. S is the scaling value.
    param P

    type P

    gp_Pnt2d

    param Ang

    type Ang

    float

    rtype

    gp_Pnt2d

Scale()
Parameters

P

type P

gp_Pnt2d

param S

type S

float

rtype

None

Scaled()
  • Transforms a point with the transformation T.
    param P

    type P

    gp_Pnt2d

    param S

    type S

    float

    rtype

    gp_Pnt2d

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}.
    param Index

    type Index

    int

    param Xi

    type Xi

    float

    rtype

    None* For this point, assigns the values Xp and Yp to its two coordinates

    param Xp

    type Xp

    float

    param Yp

    type Yp

    float

    rtype

    None

SetX()
  • Assigns the given value to the X coordinate of this point.
    param X

    type X

    float

    rtype

    None

SetXY()
  • Assigns the two coordinates of Coord to this point.
    param Coord

    type Coord

    gp_XY

    rtype

    None

SetY()
  • Assigns the given value to the Y coordinate of this point.
    param Y

    type Y

    float

    rtype

    None

SquareDistance()
  • Computes the square distance between two points.
    param Other

    type Other

    gp_Pnt2d

    rtype

    float

Transform()
Parameters

T

type T

gp_Trsf2d

rtype

None

Transformed()
  • Translates a point in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param T

    type T

    gp_Trsf2d

    rtype

    gp_Pnt2d

Translate()
Parameters

V

type V

gp_Vec2d

rtype

None:param P1:

type P1

gp_Pnt2d

param P2

type P2

gp_Pnt2d

rtype

None

Translated()
  • Translates a point from the point P1 to the point P2.
    param V

    type V

    gp_Vec2d

    rtype

    gp_Pnt2d:param P1:

    type P1

    gp_Pnt2d

    param P2

    type P2

    gp_Pnt2d

    rtype

    gp_Pnt2d

X()
  • For this point, returns its X coordinate.
    rtype

    float

XY()
  • For this point, returns its two coordinates as a number pair.
    rtype

    gp_XY

Y()
  • For this point, returns its Y coordinate.
    rtype

    float

property thisown

The membership flag

class gp_Quaternion(*args)

Bases: object

  • Creates an identity quaternion
    rtype

    None* Creates quaternion directly from component values

    param x

    type x

    float

    param y

    type y

    float

    param z

    type z

    float

    param w

    type w

    float

    rtype

    None* Creates copy of another quaternion

    param theToCopy

    type theToCopy

    gp_Quaternion

    rtype

    None* Creates quaternion representing shortest-arc rotation operator producing vector theVecTo from vector theVecFrom.

    param theVecFrom

    type theVecFrom

    gp_Vec

    param theVecTo

    type theVecTo

    gp_Vec

    rtype

    None* Creates quaternion representing shortest-arc rotation operator producing vector theVecTo from vector theVecFrom. Additional vector theHelpCrossVec defines preferred direction for rotation and is used when theVecTo and theVecFrom are directed oppositely.

    param theVecFrom

    type theVecFrom

    gp_Vec

    param theVecTo

    type theVecTo

    gp_Vec

    param theHelpCrossVec

    type theHelpCrossVec

    gp_Vec

    rtype

    None* Creates quaternion representing rotation on angle theAngle around vector theAxis

    param theAxis

    type theAxis

    gp_Vec

    param theAngle

    type theAngle

    float

    rtype

    None* Creates quaternion from rotation matrix 3*3 (which should be orthonormal skew-symmetric matrix)

    param theMat

    type theMat

    gp_Mat

    rtype

    None

Add()
  • Adds componnets of other quaternion; result is ‘rotations mix’
    param theOther

    type theOther

    gp_Quaternion

    rtype

    None

Added()
  • Makes sum of quaternion components; result is ‘rotations mix’
    param theOther

    type theOther

    gp_Quaternion

    rtype

    gp_Quaternion

Dot()
  • Computes inner product / scalar product / Dot
    param theOther

    type theOther

    gp_Quaternion

    rtype

    float

GetEulerAngles()
  • Returns Euler angles describing current rotation
    param theOrder

    type theOrder

    gp_EulerSequence

    param theAlpha

    type theAlpha

    float

    param theBeta

    type theBeta

    float

    param theGamma

    type theGamma

    float

    rtype

    None

GetMatrix()
  • Returns rotation operation as 3*3 matrix
    rtype

    gp_Mat

GetRotationAngle()
  • Return rotation angle from -PI to PI
    rtype

    float

GetVectorAndAngle()
  • Convert a quaternion to Axis+Angle representation, preserve the axis direction and angle from -PI to +PI
    param theAxis

    type theAxis

    gp_Vec

    param theAngle

    type theAngle

    float

    rtype

    None

Invert()
  • Inverts quaternion (both rotation direction and norm)
    rtype

    None

Inverted()
  • Return inversed quaternion q^-1
    rtype

    gp_Quaternion

IsEqual()
  • Simple equal test without precision
    param theOther

    type theOther

    gp_Quaternion

    rtype

    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;
    param theOther

    type theOther

    gp_Quaternion

    rtype

    gp_Quaternion

Multiply()
  • Adds rotation by multiplication
    param theOther

    type theOther

    gp_Quaternion

    rtype

    None* Rotates vector by quaternion as rotation operator

    param theVec

    type theVec

    gp_Vec

    rtype

    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.
    rtype

    gp_Quaternion

Norm()
  • Returns norm of quaternion
    rtype

    float

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
    rtype

    None

Normalized()
  • Returns quaternion scaled so that its norm goes to 1.
    rtype

    gp_Quaternion

Reverse()
  • Reverse direction of rotation (conjugate quaternion)
    rtype

    None

Reversed()
  • Return rotation with reversed direction (conjugated quaternion)
    rtype

    gp_Quaternion

Scale()
  • Scale all components by quaternion by theScale; note that rotation is not changed by this operation (except 0-scaling)
    param theScale

    type theScale

    float

    rtype

    None

Scaled()
  • Returns scaled quaternion
    param theScale

    type theScale

    float

    rtype

    gp_Quaternion

Set()
Parameters

x

type x

float

param y

type y

float

param z

type z

float

param w

type w

float

rtype

None:param theQuaternion:

type theQuaternion

gp_Quaternion

rtype

None

SetEulerAngles()
  • Create a unit quaternion representing rotation defined by generalized Euler angles
    param theOrder

    type theOrder

    gp_EulerSequence

    param theAlpha

    type theAlpha

    float

    param theBeta

    type theBeta

    float

    param theGamma

    type theGamma

    float

    rtype

    None

SetIdent()
  • Make identity quaternion (zero-rotation)
    rtype

    None

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
    param theMat

    type theMat

    gp_Mat

    rtype

    None

SetRotation()
  • Sets quaternion to shortest-arc rotation producing vector theVecTo from vector theVecFrom. If vectors theVecFrom and theVecTo are opposite then rotation axis is computed as theVecFrom ^ (1,0,0) or theVecFrom ^ (0,0,1).
    param theVecFrom

    type theVecFrom

    gp_Vec

    param theVecTo

    type theVecTo

    gp_Vec

    rtype

    None* Sets quaternion to shortest-arc rotation producing vector theVecTo from vector theVecFrom. If vectors theVecFrom and theVecTo are opposite then rotation axis is computed as theVecFrom ^ theHelpCrossVec.

    param theVecFrom

    type theVecFrom

    gp_Vec

    param theVecTo

    type theVecTo

    gp_Vec

    param theHelpCrossVec

    type theHelpCrossVec

    gp_Vec

    rtype

    None

SetVectorAndAngle()
  • Create a unit quaternion from Axis+Angle representation
    param theAxis

    type theAxis

    gp_Vec

    param theAngle

    type theAngle

    float

    rtype

    None

SquareNorm()
  • Returns square norm of quaternion
    rtype

    float

StabilizeLength()
  • Stabilize quaternion length within 1 - 1/4. This operation is a lot faster than normalization and preserve length goes to 0 or infinity
    rtype

    None

Subtract()
  • Subtracts componnets of other quaternion; result is ‘rotations mix’
    param theOther

    type theOther

    gp_Quaternion

    rtype

    None

Subtracted()
  • Makes difference of quaternion components; result is ‘rotations mix’
    param theOther

    type theOther

    gp_Quaternion

    rtype

    gp_Quaternion

W()
Return type

float

X()
Return type

float

Y()
Return type

float

Z()
Return type

float

property thisown

The membership flag

class gp_QuaternionNLerp(*args)

Bases: object

  • Empty constructor,
    rtype

    None* Constructor with initialization.

    param theQStart

    type theQStart

    gp_Quaternion

    param theQEnd

    type theQEnd

    gp_Quaternion

    rtype

    None

Init()
  • Initialize the tool with Start and End values.
    param theQStart

    type theQStart

    gp_Quaternion

    param theQEnd

    type theQEnd

    gp_Quaternion

    rtype

    None

InitFromUnit()
  • Initialize the tool with Start and End unit quaternions.
    param theQStart

    type theQStart

    gp_Quaternion

    param theQEnd

    type theQEnd

    gp_Quaternion

    rtype

    None

Interpolate()
  • Compute interpolated quaternion between two quaternions. @param theStart first quaternion @param theEnd second quaternion @param theT normalized interpolation coefficient within 0..1 range, with 0 pointing to theStart and 1 to theEnd.
    param theQStart

    type theQStart

    gp_Quaternion

    param theQEnd

    type theQEnd

    gp_Quaternion

    param theT

    type theT

    float

    rtype

    gp_Quaternion* Set interpolated quaternion for theT position (from 0.0 to 1.0)

    param theT

    type theT

    float

    param theResultQ

    type theResultQ

    gp_Quaternion

    rtype

    None

property thisown

The membership flag

class gp_QuaternionSLerp(*args)

Bases: object

  • Empty constructor,
    rtype

    None* Constructor with initialization.

    param theQStart

    type theQStart

    gp_Quaternion

    param theQEnd

    type theQEnd

    gp_Quaternion

    rtype

    None

Init()
  • Initialize the tool with Start and End values.
    param theQStart

    type theQStart

    gp_Quaternion

    param theQEnd

    type theQEnd

    gp_Quaternion

    rtype

    None

InitFromUnit()
  • Initialize the tool with Start and End unit quaternions.
    param theQStart

    type theQStart

    gp_Quaternion

    param theQEnd

    type theQEnd

    gp_Quaternion

    rtype

    None

Interpolate()
  • Compute interpolated quaternion between two quaternions. @param theStart first quaternion @param theEnd second quaternion @param theT normalized interpolation coefficient within 0..1 range, with 0 pointing to theStart and 1 to theEnd.
    param theQStart

    type theQStart

    gp_Quaternion

    param theQEnd

    type theQEnd

    gp_Quaternion

    param theT

    type theT

    float

    rtype

    gp_Quaternion* Set interpolated quaternion for theT position (from 0.0 to 1.0)

    param theT

    type theT

    float

    param theResultQ

    type theResultQ

    gp_Quaternion

    rtype

    None

property thisown

The membership flag

class gp_Sphere(*args)

Bases: object

  • Creates an indefinite sphere.
    rtype

    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

    param A3

    type A3

    gp_Ax3

    param Radius

    type Radius

    float

    rtype

    None

Area()
  • Computes the aera of the sphere.
    rtype

    float

Coefficients()
  • Computes the coefficients of the implicit equation of the quadric in the absolute cartesian coordinates systemA1.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
    param A1

    type A1

    float

    param A2

    type A2

    float

    param A3

    type A3

    float

    param B1

    type B1

    float

    param B2

    type B2

    float

    param B3

    type B3

    float

    param C1

    type C1

    float

    param C2

    type C2

    float

    param C3

    type C3

    float

    param D

    type D

    float

    rtype

    None

Direct()
  • Returns true if the local coordinate system of this sphere is right-handed.
    rtype

    bool

Location()
  • — Purpose ; Returns the center of the sphere.
    rtype

    gp_Pnt

Mirror()
Parameters

P

type P

gp_Pnt

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a sphere with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt

    rtype

    gp_Sphere* Performs the symmetrical transformation of a sphere with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax1

    rtype

    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).

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Sphere

Position()
  • Returns the local coordinates system of the sphere.
    rtype

    gp_Ax3

Radius()
  • Returns the radius of the sphere.
    rtype

    float

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a sphere. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Sphere

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

Scaled()
  • Scales a sphere. S is the scaling value. The absolute value of S is used to scale the sphere
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Sphere

SetLocation()
  • Changes the center of the sphere.
    param Loc

    type Loc

    gp_Pnt

    rtype

    None

SetPosition()
  • Changes the local coordinate system of the sphere.
    param A3

    type A3

    gp_Ax3

    rtype

    None

SetRadius()
  • Assigns R the radius of the Sphere. WarningsIt is not forbidden to create a sphere with null radius. Raises ConstructionError if R < 0.0
    param R

    type R

    float

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf

rtype

None

Transformed()
  • Transforms a sphere with the transformation T from class Trsf.
    param T

    type T

    gp_Trsf

    rtype

    gp_Sphere

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates a sphere in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec

    rtype

    gp_Sphere* Translates a sphere from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Sphere

UReverse()
  • Reverses the U parametrization of the sphere reversing the YAxis.
    rtype

    None

VReverse()
  • Reverses the V parametrization of the sphere reversing the ZAxis.
    rtype

    None

Volume()
  • Computes the volume of the sphere
    rtype

    float

XAxis()
  • Returns the axis X of the sphere.
    rtype

    gp_Ax1

YAxis()
  • Returns the axis Y of the sphere.
    rtype

    gp_Ax1

property thisown

The membership flag

class gp_Torus(*args)

Bases: object

  • creates an indefinite Torus.
    rtype

    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

    param A3

    type A3

    gp_Ax3

    param MajorRadius

    type MajorRadius

    float

    param MinorRadius

    type MinorRadius

    float

    rtype

    None

Area()
  • Computes the area of the torus.
    rtype

    float

Axis()
  • returns the symmetry axis of the torus.
    rtype

    gp_Ax1

Direct()
  • returns true if the Ax3, the local coordinate system of this torus, is right handed.
    rtype

    bool

Location()
  • Returns the Torus’s location.
    rtype

    gp_Pnt

MajorRadius()
  • returns the major radius of the torus.
    rtype

    float

MinorRadius()
  • returns the minor radius of the torus.
    rtype

    float

Mirror()
Parameters

P

type P

gp_Pnt

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a torus with respect to the point P which is the center of the symmetry.
    param P

    type P

    gp_Pnt

    rtype

    gp_Torus* Performs the symmetrical transformation of a torus with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax1

    rtype

    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).

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Torus

Position()
  • Returns the local coordinates system of the torus.
    rtype

    gp_Ax3

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a torus. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Torus

Scale()
Parameters

P

type P

gp_Pnt

param S

type S

float

rtype

None

Scaled()
  • Scales a torus. S is the scaling value. The absolute value of S is used to scale the torus
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    gp_Torus

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.
    param A1

    type A1

    gp_Ax1

    rtype

    None

SetLocation()
  • Changes the location of the torus.
    param Loc

    type Loc

    gp_Pnt

    rtype

    None

SetMajorRadius()
  • Assigns value to the major radius of this torus. Raises ConstructionError if MajorRadius - MinorRadius <= Resolution()
    param MajorRadius

    type MajorRadius

    float

    rtype

    None

SetMinorRadius()
  • Assigns value to the minor radius of this torus. Raises ConstructionError if MinorRadius < 0.0 or if MajorRadius - MinorRadius <= Resolution from gp.
    param MinorRadius

    type MinorRadius

    float

    rtype

    None

SetPosition()
  • Changes the local coordinate system of the surface.
    param A3

    type A3

    gp_Ax3

    rtype

    None

Transform()
Parameters

T

type T

gp_Trsf

rtype

None

Transformed()
  • Transforms a torus with the transformation T from class Trsf.
    param T

    type T

    gp_Trsf

    rtype

    gp_Torus

Translate()
Parameters

V

type V

gp_Vec

rtype

None:param P1:

type P1

gp_Pnt

param P2

type P2

gp_Pnt

rtype

None

Translated()
  • Translates a torus in the direction of the vector V. The magnitude of the translation is the vector’s magnitude.
    param V

    type V

    gp_Vec

    rtype

    gp_Torus* Translates a torus from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    gp_Torus

UReverse()
  • Reverses the U parametrization of the torus reversing the YAxis.
    rtype

    None

VReverse()
  • Reverses the V parametrization of the torus reversing the ZAxis.
    rtype

    None

Volume()
  • Computes the volume of the torus.
    rtype

    float

XAxis()
  • returns the axis X of the torus.
    rtype

    gp_Ax1

YAxis()
  • returns the axis Y of the torus.
    rtype

    gp_Ax1

property thisown

The membership flag

class gp_Trsf(*args)

Bases: object

  • Returns the identity transformation.
    rtype

    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.

    param T

    type T

    gp_Trsf2d

    rtype

    None

DumpJsonToString(gp_Trsf self, int depth=-1) → std::string
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.
    rtype

    gp_TrsfForm

GetRotation()
  • Returns the boolean True if there is non-zero rotation. In the presence of rotation, the output parameters store the axis and the angle of rotation. The method always returns positive value ‘theAngle’, i.e., 0. < theAngle <= PI. Note that this rotation is defined only by the vectorial part of the transformation; generally you would need to check also the translational part to obtain the axis (gp_Ax1) of rotation.
    param theAxis

    type theAxis

    gp_XYZ

    param theAngle

    type theAngle

    float

    rtype

    bool* Returns quaternion representing rotational part of the transformation.

    rtype

    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.
    rtype

    gp_Mat

Invert()
Return type

None

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. ExampleTrsf 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 !!!
    rtype

    gp_Trsf

IsNegative()
  • Returns true if the determinant of the vectorial part of this transformation is negative.
    rtype

    bool

Multiplied()
Parameters

T

type T

gp_Trsf

rtype

gp_Trsf

Multiply()
  • Computes the transformation composed with <self> and T. <self> = <self> * T
    param T

    type T

    gp_Trsf

    rtype

    None

Power()
Parameters

N

type N

int

rtype

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.
    param N

    type N

    int

    rtype

    gp_Trsf

PreMultiply()
  • Computes the transformation composed with <self> and T. <self> = T * <self>
    param T

    type T

    gp_Trsf

    rtype

    None

ScaleFactor()
  • Returns the scale factor.
    rtype

    float

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.
    param FromSystem1

    type FromSystem1

    gp_Ax3

    param ToSystem2

    type ToSystem2

    gp_Ax3

    rtype

    None

SetForm()
Parameters

P

type P

gp_TrsfForm

rtype

None

SetMirror()
  • Makes the transformation into a symmetrical transformation. P is the center of the symmetry.
    param P

    type P

    gp_Pnt

    rtype

    None* Makes the transformation into a symmetrical transformation. A1 is the center of the axial symmetry.

    param A1

    type A1

    gp_Ax1

    rtype

    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’.

    param A2

    type A2

    gp_Ax2

    rtype

    None

SetRotation()
  • Changes the transformation into a rotation. A1 is the rotation axis and Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    None* Changes the transformation into a rotation defined by quaternion. Note that rotation is performed around origin, i.e. no translation is involved.

    param R

    type R

    gp_Quaternion

    rtype

    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.
    param P

    type P

    gp_Pnt

    param S

    type S

    float

    rtype

    None

SetScaleFactor()
  • Modifies the scale factor. Raises ConstructionError If S is null.
    param S

    type S

    float

    rtype

    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’. ExampleIn a C++ implementationReal 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);
    param FromSystem1

    type FromSystem1

    gp_Ax3

    param ToSystem2

    type ToSystem2

    gp_Ax3

    rtype

    None* 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.

    param ToSystem

    type ToSystem

    gp_Ax3

    rtype

    None* Sets transformation by directly specified rotation and translation.

    param R

    type R

    gp_Quaternion

    param T

    type T

    gp_Vec

    rtype

    None

SetTranslation()
  • Changes the transformation into a translation. V is the vector of the translation.
    param V

    type V

    gp_Vec

    rtype

    None* Makes the transformation into a translation where the translation vector is the vector (P1, P2) defined from point P1 to point P2.

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    None

SetTranslationPart()
  • Replaces the translation vector with the vector V.
    param V

    type V

    gp_Vec

    rtype

    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.
    param a11

    type a11

    float

    param a12

    type a12

    float

    param a13

    type a13

    float

    param a14

    type a14

    float

    param a21

    type a21

    float

    param a22

    type a22

    float

    param a23

    type a23

    float

    param a24

    type a24

    float

    param a31

    type a31

    float

    param a32

    type a32

    float

    param a33

    type a33

    float

    param a34

    type a34

    float

    rtype

    None

Transforms()
Parameters

X

type X

float

param Y

type Y

float

param Z

type Z

float

rtype

None* Transformation of a triplet XYZ with a Trsf

param Coord

type Coord

gp_XYZ

rtype

None

TranslationPart()
  • Returns the translation part of the transformation’s matrix
    rtype

    gp_XYZ

Value()
  • Returns the coefficients of the transformation’s matrix. It is a 3 rows * 4 columns matrix. This coefficient includes the scale factor. Raises OutOfRanged if Row < 1 or Row > 3 or Col < 1 or Col > 4
    param Row

    type Row

    int

    param Col

    type Col

    int

    rtype

    float

VectorialPart()
  • Returns the vectorial part of the transformation. It is a 3*3 matrix which includes the scale factor.
    rtype

    gp_Mat

property thisown

The membership flag

class gp_Trsf2d(*args)

Bases: object

  • Returns identity transformation.
    rtype

    None* Creates a 2d transformation in the XY plane from a 3d transformation .

    param T

    type T

    gp_Trsf

    rtype

    None

Form()
  • Returns the nature of the transformation. It can be an identity transformation, a rotation, a translation, a mirror (relative to a point or an axis), a scaling transformation, or a compound transformation.
    rtype

    gp_TrsfForm

HVectorialPart()
  • Returns the homogeneous vectorial part of the transformation. It is a 2*2 matrix which doesn’t include the scale factor. The coefficients of this matrix must be multiplied by the scale factor to obtain the coefficients of the transformation.
    rtype

    gp_Mat2d

Invert()
Return type

None

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.
    rtype

    gp_Trsf2d

IsNegative()
  • Returns true if the determinant of the vectorial part of this transformation is negative..
    rtype

    bool

Multiplied()
Parameters

T

type T

gp_Trsf2d

rtype

gp_Trsf2d

Multiply()
  • Computes the transformation composed from <self> and T. <self> = <self> * T
    param T

    type T

    gp_Trsf2d

    rtype

    None

Power()
Parameters

N

type N

int

rtype

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.
    param N

    type N

    int

    rtype

    gp_Trsf2d

PreMultiply()
  • Computes the transformation composed from <self> and T. <self> = T * <self>
    param T

    type T

    gp_Trsf2d

    rtype

    None

RotationPart()
  • Returns the angle corresponding to the rotational component of the transformation matrix (operation opposite to SetRotation()).
    rtype

    float

ScaleFactor()
  • Returns the scale factor.
    rtype

    float

SetMirror()
  • Changes the transformation into a symmetrical transformation. P is the center of the symmetry.
    param P

    type P

    gp_Pnt2d

    rtype

    None* Changes the transformation into a symmetrical transformation. A is the center of the axial symmetry.

    param A

    type A

    gp_Ax2d

    rtype

    None

SetRotation()
  • Changes the transformation into a rotation. P is the rotation’s center and Ang is the angular value of the rotation in radian.
    param P

    type P

    gp_Pnt2d

    param Ang

    type Ang

    float

    rtype

    None

SetScale()
  • Changes the transformation into a scale. P is the center of the scale and S is the scaling value.
    param P

    type P

    gp_Pnt2d

    param S

    type S

    float

    rtype

    None

SetScaleFactor()
  • Modifies the scale factor.
    param S

    type S

    float

    rtype

    None

SetTransformation()
  • Changes a transformation allowing passage from the coordinate system ‘FromSystem1’ to the coordinate system ‘ToSystem2’.
    param FromSystem1

    type FromSystem1

    gp_Ax2d

    param ToSystem2

    type ToSystem2

    gp_Ax2d

    rtype

    None* Changes the transformation allowing passage from the basic coordinate system {P(0.,0.,0.), VX (1.,0.,0.), VY (0.,1.,0.)} to the local coordinate system defined with the Ax2d ToSystem.

    param ToSystem

    type ToSystem

    gp_Ax2d

    rtype

    None

SetTranslation()
  • Changes the transformation into a translation. V is the vector of the translation.
    param V

    type V

    gp_Vec2d

    rtype

    None* Makes the transformation into a translation from the point P1 to the point P2.

    param P1

    type P1

    gp_Pnt2d

    param P2

    type P2

    gp_Pnt2d

    rtype

    None

SetTranslationPart()
  • Replaces the translation vector with V.
    param V

    type V

    gp_Vec2d

    rtype

    None

SetValues()
  • Sets the coefficients of the transformation. The transformation of the point x,y is the point x’,y’ with//! x’ = a11 x + a12 y + a13 y’ = a21 x + a22 y + a23 //! The method Value(i,j) will return aij. Raises ConstructionError if the determinant of the aij is null. If the matrix as not a uniform scale it will be orthogonalized before future using.
    param a11

    type a11

    float

    param a12

    type a12

    float

    param a13

    type a13

    float

    param a21

    type a21

    float

    param a22

    type a22

    float

    param a23

    type a23

    float

    rtype

    None

Transforms()
Parameters

X

type X

float

param Y

type Y

float

rtype

None* Transforms a doublet XY with a Trsf2d

param Coord

type Coord

gp_XY

rtype

None

TranslationPart()
  • Returns the translation part of the transformation’s matrix
    rtype

    gp_XY

Value()
  • Returns the coefficients of the transformation’s matrix. It is a 2 rows * 3 columns matrix. Raises OutOfRange if Row < 1 or Row > 2 or Col < 1 or Col > 3
    param Row

    type Row

    int

    param Col

    type Col

    int

    rtype

    float

VectorialPart()
  • Returns the vectorial part of the transformation. It is a 2*2 matrix which includes the scale factor.
    rtype

    gp_Mat2d

property thisown

The membership flag

class gp_Vec(*args)

Bases: object

  • Creates a zero vector.
    rtype

    None* Creates a unitary vector from a direction V.

    param V

    type V

    gp_Dir

    rtype

    None* Creates a vector with a triplet of coordinates.

    param Coord

    type Coord

    gp_XYZ

    rtype

    None* Creates a point with its three cartesian coordinates.

    param Xv

    type Xv

    float

    param Yv

    type Yv

    float

    param Zv

    type Zv

    float

    rtype

    None* Creates a vector from two points. The length of the vector is the distance between P1 and P2

    param P1

    type P1

    gp_Pnt

    param P2

    type P2

    gp_Pnt

    rtype

    None

Add()
  • Adds two vectors
    param Other

    type Other

    gp_Vec

    rtype

    None

Added()
  • Adds two vectors
    param Other

    type Other

    gp_Vec

    rtype

    gp_Vec

Angle()
  • Computes the angular value between <self> and <Other> Returns the angle value between 0 and PI in radian. Raises VectorWithNullMagnitude if <self>.Magnitude() <= Resolution from gp or Other.Magnitude() <= Resolution because the angular value is indefinite if one of the vectors has a null magnitude.
    param Other

    type Other

    gp_Vec

    rtype

    float

AngleWithRef()
  • Computes the angle, in radians, between this vector and vector Other. The result is a value between -Pi and Pi. For this, VRef defines the positive sense of rotation: the angular value is positive, if the cross product this ^ Other has the same orientation as VRef relative to the plane defined by the vectors this and Other. Otherwise, the angular value is negative. Exceptions gp_VectorWithNullMagnitude if the magnitude of this vector, the vector Other, or the vector VRef is less than or equal to gp::Resolution(). Standard_DomainError if this vector, the vector Other, and the vector VRef are coplanar, unless this vector and the vector Other are parallel.
    param Other

    type Other

    gp_Vec

    param VRef

    type VRef

    gp_Vec

    rtype

    float

Coord()
  • Returns the coordinate of range IndexIndex = 1 => X is returned Index = 2 => Y is returned Index = 3 => Z is returned Raised if Index != {1, 2, 3}.
    param Index

    type Index

    int

    rtype

    float* For this vector returns its three coordinates Xv, Yv, and Zvinline

    param Xv

    type Xv

    float

    param Yv

    type Yv

    float

    param Zv

    type Zv

    float

    rtype

    None

Cross()
  • computes the cross product between two vectors
    param Right

    type Right

    gp_Vec

    rtype

    None

CrossCross()
  • Computes the triple vector product. <self> ^= (V1 ^ V2)
    param V1

    type V1

    gp_Vec

    param V2

    type V2

    gp_Vec

    rtype

    None

CrossCrossed()
  • Computes the triple vector product. <self> ^ (V1 ^ V2)
    param V1

    type V1

    gp_Vec

    param V2

    type V2

    gp_Vec

    rtype

    gp_Vec

CrossMagnitude()
  • Computes the magnitude of the cross product between <self> and Right. Returns || <self> ^ Right ||
    param Right

    type Right

    gp_Vec

    rtype

    float

CrossSquareMagnitude()
  • Computes the square magnitude of the cross product between <self> and Right. Returns || <self> ^ Right ||**2
    param Right

    type Right

    gp_Vec

    rtype

    float

Crossed()
  • computes the cross product between two vectors
    param Right

    type Right

    gp_Vec

    rtype

    gp_Vec

Divide()
  • Divides a vector by a scalar
    param Scalar

    type Scalar

    float

    rtype

    None

Divided()
  • Divides a vector by a scalar
    param Scalar

    type Scalar

    float

    rtype

    gp_Vec

Dot()
  • computes the scalar product
    param Other

    type Other

    gp_Vec

    rtype

    float

DotCross()
  • Computes the triple scalar product <self> * (V1 ^ V2).
    param V1

    type V1

    gp_Vec

    param V2

    type V2

    gp_Vec

    rtype

    float

IsEqual()
  • Returns True if the two vectors have the same magnitude value and the same direction. The precision values are LinearTolerance for the magnitude and AngularTolerance for the direction.
    param Other

    type Other

    gp_Vec

    param LinearTolerance

    type LinearTolerance

    float

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

IsNormal()
  • Returns True if abs(<self>.Angle(Other) - PI/2.) <= AngularTolerance Raises VectorWithNullMagnitude if <self>.Magnitude() <= Resolution or Other.Magnitude() <= Resolution from gp
    param Other

    type Other

    gp_Vec

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

IsOpposite()
  • Returns True if PI - <self>.Angle(Other) <= AngularTolerance Raises VectorWithNullMagnitude if <self>.Magnitude() <= Resolution or Other.Magnitude() <= Resolution from gp
    param Other

    type Other

    gp_Vec

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

IsParallel()
  • Returns True if Angle(<self>, Other) <= AngularTolerance or PI - Angle(<self>, Other) <= AngularTolerance This definition means that two parallel vectors cannot define a plane but two vectors with opposite directions are considered as parallel. Raises VectorWithNullMagnitude if <self>.Magnitude() <= Resolution or Other.Magnitude() <= Resolution from gp
    param Other

    type Other

    gp_Vec

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

Magnitude()
  • Computes the magnitude of this vector.
    rtype

    float

Mirror()
Parameters

V

type V

gp_Vec

rtype

None:param A1:

type A1

gp_Ax1

rtype

None:param A2:

type A2

gp_Ax2

rtype

None

Mirrored()
  • Performs the symmetrical transformation of a vector with respect to the vector V which is the center of the symmetry.
    param V

    type V

    gp_Vec

    rtype

    gp_Vec* Performs the symmetrical transformation of a vector with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax1

    rtype

    gp_Vec* Performs the symmetrical transformation of a vector with respect to a plane. The axis placement A2 locates the plane of the symmetry : (Location, XDirection, YDirection).

    param A2

    type A2

    gp_Ax2

    rtype

    gp_Vec

Multiplied()
  • Multiplies a vector by a scalar
    param Scalar

    type Scalar

    float

    rtype

    gp_Vec

Multiply()
  • Multiplies a vector by a scalar
    param Scalar

    type Scalar

    float

    rtype

    None

Normalize()
  • normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from gp.
    rtype

    None

Normalized()
  • normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from gp.
    rtype

    gp_Vec

Reverse()
  • Reverses the direction of a vector
    rtype

    None

Reversed()
  • Reverses the direction of a vector
    rtype

    gp_Vec

Rotate()
Parameters

A1

type A1

gp_Ax1

param Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a vector. A1 is the axis of the rotation. Ang is the angular value of the rotation in radians.
    param A1

    type A1

    gp_Ax1

    param Ang

    type Ang

    float

    rtype

    gp_Vec

Scale()
Parameters

S

type S

float

rtype

None

Scaled()
  • Scales a vector. S is the scaling value.
    param S

    type S

    float

    rtype

    gp_Vec

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}.
    param Index

    type Index

    int

    param Xi

    type Xi

    float

    rtype

    None* For this vector, assigns - the values Xv, Yv and Zv to its three coordinates.

    param Xv

    type Xv

    float

    param Yv

    type Yv

    float

    param Zv

    type Zv

    float

    rtype

    None

SetLinearForm()
  • <self> is set to the following linear formA1 * V1 + A2 * V2 + A3 * V3 + V4
    param A1

    type A1

    float

    param V1

    type V1

    gp_Vec

    param A2

    type A2

    float

    param V2

    type V2

    gp_Vec

    param A3

    type A3

    float

    param V3

    type V3

    gp_Vec

    param V4

    type V4

    gp_Vec

    rtype

    None* <self> is set to the following linear form : A1 * V1 + A2 * V2 + A3 * V3

    param A1

    type A1

    float

    param V1

    type V1

    gp_Vec

    param A2

    type A2

    float

    param V2

    type V2

    gp_Vec

    param A3

    type A3

    float

    param V3

    type V3

    gp_Vec

    rtype

    None* <self> is set to the following linear form : A1 * V1 + A2 * V2 + V3

    param A1

    type A1

    float

    param V1

    type V1

    gp_Vec

    param A2

    type A2

    float

    param V2

    type V2

    gp_Vec

    param V3

    type V3

    gp_Vec

    rtype

    None* <self> is set to the following linear form : A1 * V1 + A2 * V2

    param A1

    type A1

    float

    param V1

    type V1

    gp_Vec

    param A2

    type A2

    float

    param V2

    type V2

    gp_Vec

    rtype

    None* <self> is set to the following linear form : A1 * V1 + V2

    param A1

    type A1

    float

    param V1

    type V1

    gp_Vec

    param V2

    type V2

    gp_Vec

    rtype

    None* <self> is set to the following linear form : V1 + V2

    param V1

    type V1

    gp_Vec

    param V2

    type V2

    gp_Vec

    rtype

    None

SetX()
  • Assigns the given value to the X coordinate of this vector.
    param X

    type X

    float

    rtype

    None

SetXYZ()
  • Assigns the three coordinates of Coord to this vector.
    param Coord

    type Coord

    gp_XYZ

    rtype

    None

SetY()
  • Assigns the given value to the X coordinate of this vector.
    param Y

    type Y

    float

    rtype

    None

SetZ()
  • Assigns the given value to the X coordinate of this vector.
    param Z

    type Z

    float

    rtype

    None

SquareMagnitude()
  • Computes the square magnitude of this vector.
    rtype

    float

Subtract()
  • Subtracts two vectors
    param Right

    type Right

    gp_Vec

    rtype

    None

Subtracted()
  • Subtracts two vectors
    param Right

    type Right

    gp_Vec

    rtype

    gp_Vec

Transform()
  • Transforms a vector with the transformation T.
    param T

    type T

    gp_Trsf

    rtype

    None

Transformed()
  • Transforms a vector with the transformation T.
    param T

    type T

    gp_Trsf

    rtype

    gp_Vec

X()
  • For this vector, returns its X coordinate.
    rtype

    float

XYZ()
  • For this vector, returns - its three coordinates as a number triple
    rtype

    gp_XYZ

Y()
  • For this vector, returns its Y coordinate.
    rtype

    float

Z()
  • For this vector, returns its Z coordinate.
    rtype

    float

property thisown

The membership flag

class gp_Vec2d(*args)

Bases: object

  • Creates a zero vector.
    rtype

    None* Creates a unitary vector from a direction V.

    param V

    type V

    gp_Dir2d

    rtype

    None* Creates a vector with a doublet of coordinates.

    param Coord

    type Coord

    gp_XY

    rtype

    None* Creates a point with its two Cartesian coordinates.

    param Xv

    type Xv

    float

    param Yv

    type Yv

    float

    rtype

    None* Creates a vector from two points. The length of the vector is the distance between P1 and P2

    param P1

    type P1

    gp_Pnt2d

    param P2

    type P2

    gp_Pnt2d

    rtype

    None

Add()
Parameters

Other

type Other

gp_Vec2d

rtype

None

Added()
  • Adds two vectors
    param Other

    type Other

    gp_Vec2d

    rtype

    gp_Vec2d

Angle()
  • Computes the angular value between <self> and <Other> returns the angle value between -PI and PI in radian. The orientation is from <self> to Other. The positive sense is the trigonometric sense. Raises VectorWithNullMagnitude if <self>.Magnitude() <= Resolution from gp or Other.Magnitude() <= Resolution because the angular value is indefinite if one of the vectors has a null magnitude.
    param Other

    type Other

    gp_Vec2d

    rtype

    float

Coord()
  • Returns the coordinate of range IndexIndex = 1 => X is returned Index = 2 => Y is returned Raised if Index != {1, 2}.
    param Index

    type Index

    int

    rtype

    float* For this vector, returns its two coordinates Xv and Yv

    param Xv

    type Xv

    float

    param Yv

    type Yv

    float

    rtype

    None

CrossMagnitude()
  • Computes the magnitude of the cross product between <self> and Right. Returns || <self> ^ Right ||
    param Right

    type Right

    gp_Vec2d

    rtype

    float

CrossSquareMagnitude()
  • Computes the square magnitude of the cross product between <self> and Right. Returns || <self> ^ Right ||**2
    param Right

    type Right

    gp_Vec2d

    rtype

    float

Crossed()
  • Computes the crossing product between two vectors
    param Right

    type Right

    gp_Vec2d

    rtype

    float

Divide()
Parameters

Scalar

type Scalar

float

rtype

None

Divided()
  • divides a vector by a scalar
    param Scalar

    type Scalar

    float

    rtype

    gp_Vec2d

Dot()
  • Computes the scalar product
    param Other

    type Other

    gp_Vec2d

    rtype

    float

GetNormal()
Return type

gp_Vec2d

IsEqual()
  • Returns True if the two vectors have the same magnitude value and the same direction. The precision values are LinearTolerance for the magnitude and AngularTolerance for the direction.
    param Other

    type Other

    gp_Vec2d

    param LinearTolerance

    type LinearTolerance

    float

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

IsNormal()
  • Returns True if abs(Abs(<self>.Angle(Other)) - PI/2.) <= AngularTolerance Raises VectorWithNullMagnitude if <self>.Magnitude() <= Resolution or Other.Magnitude() <= Resolution from gp.
    param Other

    type Other

    gp_Vec2d

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

IsOpposite()
  • Returns True if PI - Abs(<self>.Angle(Other)) <= AngularTolerance Raises VectorWithNullMagnitude if <self>.Magnitude() <= Resolution or Other.Magnitude() <= Resolution from gp.
    param Other

    type Other

    gp_Vec2d

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

IsParallel()
  • Returns true if Abs(Angle(<self>, Other)) <= AngularTolerance or PI - Abs(Angle(<self>, Other)) <= AngularTolerance Two vectors with opposite directions are considered as parallel. Raises VectorWithNullMagnitude if <self>.Magnitude() <= Resolution or Other.Magnitude() <= Resolution from gp
    param Other

    type Other

    gp_Vec2d

    param AngularTolerance

    type AngularTolerance

    float

    rtype

    bool

Magnitude()
  • Computes the magnitude of this vector.
    rtype

    float

Mirror()
  • Performs the symmetrical transformation of a vector with respect to the vector V which is the center of the symmetry.
    param V

    type V

    gp_Vec2d

    rtype

    None* Performs the symmetrical transformation of a vector with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax2d

    rtype

    None

Mirrored()
  • Performs the symmetrical transformation of a vector with respect to the vector V which is the center of the symmetry.
    param V

    type V

    gp_Vec2d

    rtype

    gp_Vec2d* Performs the symmetrical transformation of a vector with respect to an axis placement which is the axis of the symmetry.

    param A1

    type A1

    gp_Ax2d

    rtype

    gp_Vec2d

Multiplied()
  • Normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from package gp.
    param Scalar

    type Scalar

    float

    rtype

    gp_Vec2d

Multiply()
Parameters

Scalar

type Scalar

float

rtype

None

Normalize()
Return type

None

Normalized()
  • Normalizes a vector Raises an exception if the magnitude of the vector is lower or equal to Resolution from package gp. Reverses the direction of a vector
    rtype

    gp_Vec2d

Reverse()
Return type

None

Reversed()
  • Reverses the direction of a vector
    rtype

    gp_Vec2d

Rotate()
Parameters

Ang

type Ang

float

rtype

None

Rotated()
  • Rotates a vector. Ang is the angular value of the rotation in radians.
    param Ang

    type Ang

    float

    rtype

    gp_Vec2d

Scale()
Parameters

S

type S

float

rtype

None

Scaled()
  • Scales a vector. S is the scaling value.
    param S

    type S

    float

    rtype

    gp_Vec2d

SetCoord()
  • Changes the coordinate of range Index Index = 1 => X is modified Index = 2 => Y is modified Raises OutOfRange if Index != {1, 2}.
    param Index

    type Index

    int

    param Xi

    type Xi

    float

    rtype

    None* For this vector, assigns the values Xv and Yv to its two coordinates

    param Xv

    type Xv

    float

    param Yv

    type Yv

    float

    rtype

    None

SetLinearForm()
  • <self> is set to the following linear formA1 * V1 + A2 * V2 + V3
    param A1

    type A1

    float

    param V1

    type V1

    gp_Vec2d

    param A2

    type A2

    float

    param V2

    type V2

    gp_Vec2d

    param V3

    type V3

    gp_Vec2d

    rtype

    None* <self> is set to the following linear form : A1 * V1 + A2 * V2

    param A1

    type A1

    float

    param V1

    type V1

    gp_Vec2d

    param A2

    type A2

    float

    param V2

    type V2

    gp_Vec2d

    rtype

    None* <self> is set to the following linear form : A1 * V1 + V2

    param A1

    type A1

    float

    param V1

    type V1

    gp_Vec2d

    param V2

    type V2

    gp_Vec2d

    rtype

    None* <self> is set to the following linear form : Left + Right

    param Left

    type Left

    gp_Vec2d

    param Right

    type Right

    gp_Vec2d

    rtype

    None

SetX()
  • Assigns the given value to the X coordinate of this vector.
    param X

    type X

    float

    rtype

    None

SetXY()
  • Assigns the two coordinates of Coord to this vector.
    param Coord

    type Coord

    gp_XY

    rtype

    None

SetY()
  • Assigns the given value to the Y coordinate of this vector.
    param Y

    type Y

    float

    rtype

    None

SquareMagnitude()
  • Computes the square magnitude of this vector.
    rtype

    float

Subtract()
  • Subtracts two vectors
    param Right

    type Right

    gp_Vec2d

    rtype

    None

Subtracted()
  • Subtracts two vectors
    param Right

    type Right

    gp_Vec2d

    rtype

    gp_Vec2d

Transform()
Parameters

T

type T

gp_Trsf2d

rtype

None

Transformed()
  • Transforms a vector with a Trsf from gp.
    param T

    type T

    gp_Trsf2d

    rtype

    gp_Vec2d

X()
  • For this vector, returns its X coordinate.
    rtype

    float

XY()
  • For this vector, returns its two coordinates as a number pair
    rtype

    gp_XY

Y()
  • For this vector, returns its Y coordinate.
    rtype

    float

property thisown

The membership flag

class gp_XY(*args)

Bases: object

  • Creates XY object with zero coordinates (0,0).
    rtype

    None* a number pair defined by the XY coordinates

    param X

    type X

    float

    param Y

    type Y

    float

    rtype

    None

Add()
  • Computes the sum of this number pair and number pair Other <self>.X() = <self>.X() + Other.X() <self>.Y() = <self>.Y() + Other.Y()
    param Other

    type Other

    gp_XY

    rtype

    None

Added()
  • Computes the sum of this number pair and number pair Other new.X() = <self>.X() + Other.X() new.Y() = <self>.Y() + Other.Y()
    param Other

    type Other

    gp_XY

    rtype

    gp_XY

Coord()
  • returns the coordinate of range IndexIndex = 1 => X is returned Index = 2 => Y is returned Raises OutOfRange if Index != {1, 2}.
    param Index

    type Index

    int

    rtype

    float* For this number pair, returns its coordinates X and Y.

    param X

    type X

    float

    param Y

    type Y

    float

    rtype

    None

CrossMagnitude()
  • computes the magnitude of the cross product between <self> and Right. Returns || <self> ^ Right ||
    param Right

    type Right

    gp_XY

    rtype

    float

CrossSquareMagnitude()
  • computes the square magnitude of the cross product between <self> and Right. Returns || <self> ^ Right ||**2
    param Right

    type Right

    gp_XY

    rtype

    float

Crossed()
  • Real D = <self>.X() * Other.Y() - <self>.Y() * Other.X()
    param Right

    type Right

    gp_XY

    rtype

    float

Divide()
  • divides <self> by a real.
    param Scalar

    type Scalar

    float

    rtype

    None

Divided()
  • Divides <self> by a real.
    param Scalar

    type Scalar

    float

    rtype

    gp_XY

Dot()
  • Computes the scalar product between <self> and Other
    param Other

    type Other

    gp_XY

    rtype

    float

GetChangeCoord(gp_XY self, Standard_Integer const theIndex) → Standard_Real
IsEqual()
  • Returns true if the coordinates of this number pair are equal to the respective coordinates of the number pair Other, within the specified tolerance Tolerance. I.e.: abs(<self>.X() - Other.X()) <= Tolerance and abs(<self>.Y() - Other.Y()) <= Tolerance and computations
    param Other

    type Other

    gp_XY

    param Tolerance

    type Tolerance

    float

    rtype

    bool

Modulus()
  • Computes Sqrt (X*X + Y*Y) where X and Y are the two coordinates of this number pair.
    rtype

    float

Multiplied()
  • New.X() = <self>.X() * Scalar; New.Y() = <self>.Y() * Scalar;
    param Scalar

    type Scalar

    float

    rtype

    gp_XY* new.X() = <self>.X() * Other.X(); new.Y() = <self>.Y() * Other.Y();

    param Other

    type Other

    gp_XY

    rtype

    gp_XY* New = Matrix * <self>

    param Matrix

    type Matrix

    gp_Mat2d

    rtype

    gp_XY

Multiply()
  • <self>.X() = <self>.X() * Scalar; <self>.Y() = <self>.Y() * Scalar;
    param Scalar

    type Scalar

    float

    rtype

    None* <self>.X() = <self>.X() * Other.X(); <self>.Y() = <self>.Y() * Other.Y();

    param Other

    type Other

    gp_XY

    rtype

    None* <self> = Matrix * <self>

    param Matrix

    type Matrix

    gp_Mat2d

    rtype

    None

Normalize()
  • <self>.X() = <self>.X()/ <self>.Modulus() <self>.Y() = <self>.Y()/ <self>.Modulus() Raises ConstructionError if <self>.Modulus() <= Resolution from gp
    rtype

    None

Normalized()
  • New.X() = <self>.X()/ <self>.Modulus() New.Y() = <self>.Y()/ <self>.Modulus() Raises ConstructionError if <self>.Modulus() <= Resolution from gp
    rtype

    gp_XY

Reverse()
  • <self>.X() = -<self>.X() <self>.Y() = -<self>.Y()
    rtype

    None

Reversed()
  • New.X() = -<self>.X() New.Y() = -<self>.Y()
    rtype

    gp_XY

SetChangeCoord(gp_XY self, Standard_Integer const theIndex, Standard_Real value)
SetCoord()
  • modifies the coordinate of range Index Index = 1 => X is modified Index = 2 => Y is modified Raises OutOfRange if Index != {1, 2}.
    param Index

    type Index

    int

    param Xi

    type Xi

    float

    rtype

    None* For this number pair, assigns the values X and Y to its coordinates

    param X

    type X

    float

    param Y

    type Y

    float

    rtype

    None

SetLinearForm()
  • Computes the following linear combination and assigns the result to this number pair: A1 * XY1 + A2 * XY2
    param A1

    type A1

    float

    param XY1

    type XY1

    gp_XY

    param A2

    type A2

    float

    param XY2

    type XY2

    gp_XY

    rtype

    None* – Computes the following linear combination and assigns the result to this number pair: A1 * XY1 + A2 * XY2 + XY3

    param A1

    type A1

    float

    param XY1

    type XY1

    gp_XY

    param A2

    type A2

    float

    param XY2

    type XY2

    gp_XY

    param XY3

    type XY3

    gp_XY

    rtype

    None* Computes the following linear combination and assigns the result to this number pair: A1 * XY1 + XY2

    param A1

    type A1

    float

    param XY1

    type XY1

    gp_XY

    param XY2

    type XY2

    gp_XY

    rtype

    None* Computes the following linear combination and assigns the result to this number pair: XY1 + XY2

    param XY1

    type XY1

    gp_XY

    param XY2

    type XY2

    gp_XY

    rtype

    None

SetX()
  • Assigns the given value to the X coordinate of this number pair.
    param X

    type X

    float

    rtype

    None

SetY()
  • Assigns the given value to the Y coordinate of this number pair.
    param Y

    type Y

    float

    rtype

    None

SquareModulus()
  • Computes X*X + Y*Y where X and Y are the two coordinates of this number pair.
    rtype

    float

Subtract()
  • <self>.X() = <self>.X() - Other.X() <self>.Y() = <self>.Y() - Other.Y()
    param Right

    type Right

    gp_XY

    rtype

    None

Subtracted()
  • new.X() = <self>.X() - Other.X() new.Y() = <self>.Y() - Other.Y()
    param Right

    type Right

    gp_XY

    rtype

    gp_XY

X()
  • Returns the X coordinate of this number pair.
    rtype

    float

Y()
  • Returns the Y coordinate of this number pair.
    rtype

    float

property thisown

The membership flag

class gp_XYZ(*args)

Bases: object

  • Creates an XYZ object with zero co-ordinates (0,0,0)
    rtype

    None* creates an XYZ with given coordinates

    param X

    type X

    float

    param Y

    type Y

    float

    param Z

    type Z

    float

    rtype

    None

Add()
  • <self>.X() = <self>.X() + Other.X() <self>.Y() = <self>.Y() + Other.Y() <self>.Z() = <self>.Z() + Other.Z()
    param Other

    type Other

    gp_XYZ

    rtype

    None

Added()
  • new.X() = <self>.X() + Other.X() new.Y() = <self>.Y() + Other.Y() new.Z() = <self>.Z() + Other.Z()
    param Other

    type Other

    gp_XYZ

    rtype

    gp_XYZ

ChangeData()
  • Returns a ptr to coordinates location. Is useful for algorithms, but DOES NOT PERFORM ANY CHECKS!
    rtype

    inline float *

Coord()
  • returns the coordinate of range IndexIndex = 1 => X is returned Index = 2 => Y is returned Index = 3 => Z is returned //! Raises OutOfRange if Index != {1, 2, 3}.
    param Index

    type Index

    int

    rtype

    float:param X:

    type X

    float

    param Y

    type Y

    float

    param Z

    type Z

    float

    rtype

    None

Cross()
  • <self>.X() = <self>.Y() * Other.Z() - <self>.Z() * Other.Y() <self>.Y() = <self>.Z() * Other.X() - <self>.X() * Other.Z() <self>.Z() = <self>.X() * Other.Y() - <self>.Y() * Other.X()
    param Right

    type Right

    gp_XYZ

    rtype

    None

CrossCross()
  • Triple vector product Computes <self> = <self>.Cross(Coord1.Cross(Coord2))
    param Coord1

    type Coord1

    gp_XYZ

    param Coord2

    type Coord2

    gp_XYZ

    rtype

    None

CrossCrossed()
  • Triple vector product computes New = <self>.Cross(Coord1.Cross(Coord2))
    param Coord1

    type Coord1

    gp_XYZ

    param Coord2

    type Coord2

    gp_XYZ

    rtype

    gp_XYZ

CrossMagnitude()
  • Computes the magnitude of the cross product between <self> and Right. Returns || <self> ^ Right ||
    param Right

    type Right

    gp_XYZ

    rtype

    float

CrossSquareMagnitude()
  • Computes the square magnitude of the cross product between <self> and Right. Returns || <self> ^ Right ||**2
    param Right

    type Right

    gp_XYZ

    rtype

    float

Crossed()
  • new.X() = <self>.Y() * Other.Z() - <self>.Z() * Other.Y() new.Y() = <self>.Z() * Other.X() - <self>.X() * Other.Z() new.Z() = <self>.X() * Other.Y() - <self>.Y() * Other.X()
    param Right

    type Right

    gp_XYZ

    rtype

    gp_XYZ

Divide()
  • divides <self> by a real.
    param Scalar

    type Scalar

    float

    rtype

    None

Divided()
  • divides <self> by a real.
    param Scalar

    type Scalar

    float

    rtype

    gp_XYZ

Dot()
  • computes the scalar product between <self> and Other
    param Other

    type Other

    gp_XYZ

    rtype

    float

DotCross()
  • computes the triple scalar product
    param Coord1

    type Coord1

    gp_XYZ

    param Coord2

    type Coord2

    gp_XYZ

    rtype

    float

DumpJsonToString(gp_XYZ self, int depth=-1) → std::string
GetChangeCoord(gp_XYZ self, Standard_Integer const theIndex) → Standard_Real
GetData()
  • Returns a const ptr to coordinates location. Is useful for algorithms, but DOES NOT PERFORM ANY CHECKS!
    rtype

    inline float *

IsEqual()
  • Returns True if he coordinates of this XYZ object are equal to the respective coordinates Other, within the specified tolerance Tolerance. I.e.: abs(<self>.X() - Other.X()) <= Tolerance and abs(<self>.Y() - Other.Y()) <= Tolerance and abs(<self>.Z() - Other.Z()) <= Tolerance.
    param Other

    type Other

    gp_XYZ

    param Tolerance

    type Tolerance

    float

    rtype

    bool

Modulus()
  • computes Sqrt (X*X + Y*Y + Z*Z) where X, Y and Z are the three coordinates of this XYZ object.
    rtype

    float

Multiplied()
  • New.X() = <self>.X() * Scalar; New.Y() = <self>.Y() * Scalar; New.Z() = <self>.Z() * Scalar;
    param Scalar

    type Scalar

    float

    rtype

    gp_XYZ* new.X() = <self>.X() * Other.X(); new.Y() = <self>.Y() * Other.Y(); new.Z() = <self>.Z() * Other.Z();

    param Other

    type Other

    gp_XYZ

    rtype

    gp_XYZ* New = Matrix * <self>

    param Matrix

    type Matrix

    gp_Mat

    rtype

    gp_XYZ

Multiply()
  • <self>.X() = <self>.X() * Scalar; <self>.Y() = <self>.Y() * Scalar; <self>.Z() = <self>.Z() * Scalar;
    param Scalar

    type Scalar

    float

    rtype

    None* <self>.X() = <self>.X() * Other.X(); <self>.Y() = <self>.Y() * Other.Y(); <self>.Z() = <self>.Z() * Other.Z();

    param Other

    type Other

    gp_XYZ

    rtype

    None* <self> = Matrix * <self>

    param Matrix

    type Matrix

    gp_Mat

    rtype

    None

Normalize()
  • <self>.X() = <self>.X()/ <self>.Modulus() <self>.Y() = <self>.Y()/ <self>.Modulus() <self>.Z() = <self>.Z()/ <self>.Modulus() Raised if <self>.Modulus() <= Resolution from gp
    rtype

    None

Normalized()
  • New.X() = <self>.X()/ <self>.Modulus() New.Y() = <self>.Y()/ <self>.Modulus() New.Z() = <self>.Z()/ <self>.Modulus() Raised if <self>.Modulus() <= Resolution from gp
    rtype

    gp_XYZ

Reverse()
  • <self>.X() = -<self>.X() <self>.Y() = -<self>.Y() <self>.Z() = -<self>.Z()
    rtype

    None

Reversed()
  • New.X() = -<self>.X() New.Y() = -<self>.Y() New.Z() = -<self>.Z()
    rtype

    gp_XYZ

SetChangeCoord(gp_XYZ self, Standard_Integer const theIndex, Standard_Real value)
SetCoord()
  • For this XYZ object, assigns the values X, Y and Z to its three coordinates
    param X

    type X

    float

    param Y

    type Y

    float

    param Z

    type Z

    float

    rtype

    None* modifies the coordinate of range Index Index = 1 => X is modified Index = 2 => Y is modified Index = 3 => Z is modified Raises OutOfRange if Index != {1, 2, 3}.

    param Index

    type Index

    int

    param Xi

    type Xi

    float

    rtype

    None

SetLinearForm()
  • <self> is set to the following linear formA1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3 + XYZ4
    param A1

    type A1

    float

    param XYZ1

    type XYZ1

    gp_XYZ

    param A2

    type A2

    float

    param XYZ2

    type XYZ2

    gp_XYZ

    param A3

    type A3

    float

    param XYZ3

    type XYZ3

    gp_XYZ

    param XYZ4

    type XYZ4

    gp_XYZ

    rtype

    None* <self> is set to the following linear form : A1 * XYZ1 + A2 * XYZ2 + A3 * XYZ3

    param A1

    type A1

    float

    param XYZ1

    type XYZ1

    gp_XYZ

    param A2

    type A2

    float

    param XYZ2

    type XYZ2

    gp_XYZ

    param A3

    type A3

    float

    param XYZ3

    type XYZ3

    gp_XYZ

    rtype

    None* <self> is set to the following linear form : A1 * XYZ1 + A2 * XYZ2 + XYZ3

    param A1

    type A1

    float

    param XYZ1

    type XYZ1

    gp_XYZ

    param A2

    type A2

    float

    param XYZ2

    type XYZ2

    gp_XYZ

    param XYZ3

    type XYZ3

    gp_XYZ

    rtype

    None* <self> is set to the following linear form : A1 * XYZ1 + A2 * XYZ2

    param A1

    type A1

    float

    param XYZ1

    type XYZ1

    gp_XYZ

    param A2

    type A2

    float

    param XYZ2

    type XYZ2

    gp_XYZ

    rtype

    None* <self> is set to the following linear form : A1 * XYZ1 + XYZ2

    param A1

    type A1

    float

    param XYZ1

    type XYZ1

    gp_XYZ

    param XYZ2

    type XYZ2

    gp_XYZ

    rtype

    None* <self> is set to the following linear form : XYZ1 + XYZ2

    param XYZ1

    type XYZ1

    gp_XYZ

    param XYZ2

    type XYZ2

    gp_XYZ

    rtype

    None

SetX()
  • Assigns the given value to the X coordinate
    param X

    type X

    float

    rtype

    None

SetY()
  • Assigns the given value to the Y coordinate
    param Y

    type Y

    float

    rtype

    None

SetZ()
  • Assigns the given value to the Z coordinate
    param Z

    type Z

    float

    rtype

    None

SquareModulus()
  • Computes X*X + Y*Y + Z*Z where X, Y and Z are the three coordinates of this XYZ object.
    rtype

    float

Subtract()
  • <self>.X() = <self>.X() - Other.X() <self>.Y() = <self>.Y() - Other.Y() <self>.Z() = <self>.Z() - Other.Z()
    param Right

    type Right

    gp_XYZ

    rtype

    None

Subtracted()
  • new.X() = <self>.X() - Other.X() new.Y() = <self>.Y() - Other.Y() new.Z() = <self>.Z() - Other.Z()
    param Right

    type Right

    gp_XYZ

    rtype

    gp_XYZ

X()
  • Returns the X coordinate
    rtype

    float

Y()
  • Returns the Y coordinate
    rtype

    float

Z()
  • Returns the Z coordinate
    rtype

    float

property thisown

The membership flag