OCC.ElCLib module

class SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
class elclib

Bases: object

static AdjustPeriodic(*args)
  • Adjust U1 and U2 in the parametric range UFirst Ulast of a periodic curve, where ULast - UFirst is its period. To do this, this function: - sets U1 in the range [ UFirst, ULast ] by adding/removing the period to/from the value U1, then - sets U2 in the range [ U1, U1 + period ] by adding/removing the period to/from the value U2. Precision is used to test the equalities.
Parameters:
  • UFirst (float) –
  • ULast (float) –
  • Precision (float) –
  • U1 (float &) –
  • U2 (float &) –
Return type:

void

static CircleD1(*args)
Parameters:
Return type:

void

Return type:

void

static CircleD2(*args)
Parameters:
Return type:

void

Return type:

void

static CircleD3(*args)
Parameters:
Return type:

void

Return type:

void

static CircleDN(*args)
Parameters:
Return type:

gp_Vec

Return type:

gp_Vec2d

static CircleParameter(*args)
Parameters:
Return type:

float

  • Pos is the Axis of the Circle parametrization In the local coordinate system of the circle X (U) = Radius * Cos (U) Y (U) = Radius * Sin (U)
Parameters:
Return type:

float

static CircleValue(*args)
Parameters:
Return type:

gp_Pnt

Return type:

gp_Pnt2d

static D1(*args)
  • For elementary curves (lines, circles and conics) from the gp package, computes: - the point P of parameter U, and - the first derivative vector V1 at this point. The results P and V1 are either: - a gp_Pnt point and a gp_Vec vector, for a curve in 3D space, or - a gp_Pnt2d point and a gp_Vec2d vector, for a curve in 2D space.
Parameters:
  • U (float) –
  • L (gp_Lin2d) –
  • P (gp_Pnt2d) –
  • V1 (gp_Vec2d) –
  • U
  • C (gp_Circ2d) –
  • P
  • V1
  • U
  • E (gp_Elips2d) –
  • P
  • V1
  • U
  • H (gp_Hypr2d) –
  • P
  • V1
  • U
  • Prb (gp_Parab2d) –
  • P
  • V1
  • U
  • L
  • P
  • V1
  • U
  • C
  • P
  • V1
  • U
  • E
  • P
  • V1
  • U
  • H
  • P
  • V1
  • U
  • Prb
  • P
  • V1
Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

static D2(*args)
  • For elementary curves (circles and conics) from the gp package, computes: - the point P of parameter U, and - the first and second derivative vectors V1 and V2 at this point. The results, P, V1 and V2, are either: - a gp_Pnt point and two gp_Vec vectors, for a curve in 3D space, or - a gp_Pnt2d point and two gp_Vec2d vectors, for a curve in 2D space.
Parameters:
  • U (float) –
  • C (gp_Circ2d) –
  • P (gp_Pnt2d) –
  • V1 (gp_Vec2d) –
  • V2 (gp_Vec2d) –
  • U
  • E (gp_Elips2d) –
  • P
  • V1
  • V2
  • U
  • H (gp_Hypr2d) –
  • P
  • V1
  • V2
  • U
  • Prb (gp_Parab2d) –
  • P
  • V1
  • V2
  • U
  • C
  • P
  • V1
  • V2
  • U
  • E
  • P
  • V1
  • V2
  • U
  • H
  • P
  • V1
  • V2
  • U
  • Prb
  • P
  • V1
  • V2
Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

static D3(*args)
  • For elementary curves (circles, ellipses and hyperbolae) from the gp package, computes: - the point P of parameter U, and - the first, second and third derivative vectors V1, V2 and V3 at this point. The results, P, V1, V2 and V3, are either: - a gp_Pnt point and three gp_Vec vectors, for a curve in 3D space, or - a gp_Pnt2d point and three gp_Vec2d vectors, for a curve in 2D space.
Parameters:
Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

  • In the following functions N is the order of derivation and should be greater than 0
Parameters:
Return type:

void

static DN(*args)
  • For elementary curves (lines, circles and conics) from the gp package, computes the vector corresponding to the Nth derivative at the point of parameter U. The result is either: - a gp_Vec vector for a curve in 3D space, or - a gp_Vec2d vector for a curve in 2D space. In the following functions N is the order of derivation and should be greater than 0
Parameters:
Return type:

gp_Vec

Return type:

gp_Vec

Return type:

gp_Vec

Return type:

gp_Vec

Return type:

gp_Vec

Return type:

gp_Vec2d

Return type:

gp_Vec2d

Return type:

gp_Vec2d

Return type:

gp_Vec2d

Return type:

gp_Vec2d

static EllipseD1(*args)
Parameters:
Return type:

void

Return type:

void

static EllipseD2(*args)
Parameters:
Return type:

void

Return type:

void

static EllipseD3(*args)
Parameters:
Return type:

void

Return type:

void

static EllipseDN(*args)
Parameters:
  • U (float) –
  • Pos (gp_Ax22d) –
  • MajorRadius (float) –
  • MinorRadius (float) –
  • N (int) –
  • U
  • Pos
  • MajorRadius
  • MinorRadius
  • N
Return type:

gp_Vec

Return type:

gp_Vec2d

static EllipseParameter(*args)
Parameters:
Return type:

float

  • Pos is the Axis of the Ellipse parametrization In the local coordinate system of the Ellipse X (U) = MajorRadius * Cos (U) Y (U) = MinorRadius * Sin (U)
Parameters:
Return type:

float

static EllipseValue(*args)
Parameters:
  • U (float) –
  • Pos (gp_Ax22d) –
  • MajorRadius (float) –
  • MinorRadius (float) –
  • U
  • Pos
  • MajorRadius
  • MinorRadius
Return type:

gp_Pnt

Return type:

gp_Pnt2d

static HyperbolaD1(*args)
Parameters:
Return type:

void

Return type:

void

static HyperbolaD2(*args)
Parameters:
Return type:

void

Return type:

void

static HyperbolaD3(*args)
Parameters:
Return type:

void

  • In the following functions N is the order of derivation and should be greater than 0
Parameters:
Return type:

void

static HyperbolaDN(*args)
Parameters:
  • U (float) –
  • Pos (gp_Ax22d) –
  • MajorRadius (float) –
  • MinorRadius (float) –
  • N (int) –
  • U
  • Pos
  • MajorRadius
  • MinorRadius
  • N
Return type:

gp_Vec

Return type:

gp_Vec2d

static HyperbolaParameter(*args)
Parameters:
Return type:

float

  • Pos is the Axis of the Hyperbola parametrization In the local coordinate system of the Hyperbola X (U) = MajorRadius * Ch (U) Y (U) = MinorRadius * Sh (U)
Parameters:
Return type:

float

static HyperbolaValue(*args)
Parameters:
  • U (float) –
  • Pos (gp_Ax22d) –
  • MajorRadius (float) –
  • MinorRadius (float) –
  • U
  • Pos
  • MajorRadius
  • MinorRadius
Return type:

gp_Pnt

Return type:

gp_Pnt2d

static InPeriod(*args)
  • Return a value in the range <UFirst, ULast> by adding or removing the period <ULast - UFirst> to <U>.
Parameters:
Return type:

float

static LineD1(*args)
Parameters:
Return type:

void

Return type:

void

static LineDN(*args)
  • In the following functions N is the order of derivation and should be greater than 0
Parameters:
Return type:

gp_Vec

Return type:

gp_Vec2d

static LineParameter(*args)
Parameters:
Return type:

float

  • parametrization P (U) = L.Location() + U * L.Direction()
Parameters:
Return type:

float

static LineValue(*args)
  • Curve evaluation The following basis functions compute the derivatives on elementary curves defined by their geometric characteristics. These functions can be called without constructing a conic from package gp. They are called by the previous functions. Example : A circle is defined by its position and its radius.
Parameters:
Return type:

gp_Pnt

Return type:

gp_Pnt2d

static ParabolaD1(*args)
Parameters:
Return type:

void

Return type:

void

static ParabolaD2(*args)
Parameters:
Return type:

void

Return type:

void

static ParabolaDN(*args)
Parameters:
Return type:

gp_Vec

  • The following functions compute the parametric value corresponding to a given point on a elementary curve. The point should be on the curve.
Parameters:
Return type:

gp_Vec2d

static ParabolaParameter(*args)
Parameters:
Return type:

float

  • Pos is the mirror axis of the parabola parametrization In the local coordinate system of the parabola Y**2 = (2*P) * X where P is the distance between the focus and the directrix. The following functions build a 3d curve from a 2d curve at a given position defined with an Ax2.
Parameters:
Return type:

float

static ParabolaValue(*args)
Parameters:
Return type:

gp_Pnt

Return type:

gp_Pnt2d

static Parameter(*args)
  • Computes the parameter value of the point P on the given curve. Note: In its local coordinate system, the parametric equation of the curve is given by the following: - for the line L: P(U) = Po + U*Vo where Po is the origin and Vo the unit vector of its positioning axis. - for the circle C: X(U) = Radius*Cos(U), Y(U) = Radius*Sin(U) - for the ellipse E: X(U) = MajorRadius*Cos(U). Y(U) = MinorRadius*Sin(U) - for the hyperbola H: X(U) = MajorRadius*Ch(U), Y(U) = MinorRadius*Sh(U) - for the parabola Prb: X(U) = U**2 / (2*p) Y(U) = U where p is the distance between the focus and the directrix. Warning The point P must be on the curve. These functions are not protected, however, and if point P is not on the curve, an exception may be raised.
Parameters:
Return type:

float

  • parametrization P (U) = L.Location() + U * L.Direction()
Parameters:
Return type:

float

Return type:

float

  • parametrization In the local coordinate system of the circle X (U) = Radius * Cos (U) Y (U) = Radius * Sin (U)
Parameters:
Return type:

float

Return type:

float

  • parametrization In the local coordinate system of the Ellipse X (U) = MajorRadius * Cos (U) Y (U) = MinorRadius * Sin (U)
Parameters:
Return type:

float

Return type:

float

  • parametrization In the local coordinate system of the Hyperbola X (U) = MajorRadius * Ch (U) Y (U) = MinorRadius * Sh (U)
Parameters:
Return type:

float

Return type:

float

  • parametrization In the local coordinate system of the parabola Y**2 = (2*P) * X where P is the distance between the focus and the directrix.
Parameters:
Return type:

float

static To3d(*args)
Parameters:
Return type:

gp_Pnt

Return type:

gp_Vec

Return type:

gp_Dir

Return type:

gp_Ax1

Return type:

gp_Ax2

Return type:

gp_Lin

Return type:

gp_Circ

Return type:

gp_Elips

Return type:

gp_Hypr

  • These functions build a 3D geometric entity from a 2D geometric entity. The ‘X Axis’ and the ‘Y Axis’ of the global coordinate system (i.e. 2D space) are lined up respectively with the ‘X Axis’ and ‘Y Axis’ of the 3D coordinate system, Pos.
Parameters:
Return type:

gp_Parab

static Value(*args)
  • For elementary curves (lines, circles and conics) from the gp package, computes the point of parameter U. The result is either: - a gp_Pnt point for a curve in 3D space, or - a gp_Pnt2d point for a curve in 2D space.
Parameters:
Return type:

gp_Pnt

Return type:

gp_Pnt

Return type:

gp_Pnt

Return type:

gp_Pnt

Return type:

gp_Pnt

Return type:

gp_Pnt2d

Return type:

gp_Pnt2d

Return type:

gp_Pnt2d

Return type:

gp_Pnt2d

Return type:

gp_Pnt2d

thisown

The membership flag

elclib_AdjustPeriodic(*args)
  • Adjust U1 and U2 in the parametric range UFirst Ulast of a periodic curve, where ULast - UFirst is its period. To do this, this function: - sets U1 in the range [ UFirst, ULast ] by adding/removing the period to/from the value U1, then - sets U2 in the range [ U1, U1 + period ] by adding/removing the period to/from the value U2. Precision is used to test the equalities.
Parameters:
  • UFirst (float) –
  • ULast (float) –
  • Precision (float) –
  • U1 (float &) –
  • U2 (float &) –
Return type:

void

elclib_CircleD1(*args)
Parameters:
Return type:

void

Return type:

void

elclib_CircleD2(*args)
Parameters:
Return type:

void

Return type:

void

elclib_CircleD3(*args)
Parameters:
Return type:

void

Return type:

void

elclib_CircleDN(*args)
Parameters:
Return type:

gp_Vec

Return type:

gp_Vec2d

elclib_CircleParameter(*args)
Parameters:
Return type:

float

  • Pos is the Axis of the Circle parametrization In the local coordinate system of the circle X (U) = Radius * Cos (U) Y (U) = Radius * Sin (U)
Parameters:
Return type:

float

elclib_CircleValue(*args)
Parameters:
Return type:

gp_Pnt

Return type:

gp_Pnt2d

elclib_D1(*args)
  • For elementary curves (lines, circles and conics) from the gp package, computes: - the point P of parameter U, and - the first derivative vector V1 at this point. The results P and V1 are either: - a gp_Pnt point and a gp_Vec vector, for a curve in 3D space, or - a gp_Pnt2d point and a gp_Vec2d vector, for a curve in 2D space.
Parameters:
  • U (float) –
  • L (gp_Lin2d) –
  • P (gp_Pnt2d) –
  • V1 (gp_Vec2d) –
  • U
  • C (gp_Circ2d) –
  • P
  • V1
  • U
  • E (gp_Elips2d) –
  • P
  • V1
  • U
  • H (gp_Hypr2d) –
  • P
  • V1
  • U
  • Prb (gp_Parab2d) –
  • P
  • V1
  • U
  • L
  • P
  • V1
  • U
  • C
  • P
  • V1
  • U
  • E
  • P
  • V1
  • U
  • H
  • P
  • V1
  • U
  • Prb
  • P
  • V1
Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

elclib_D2(*args)
  • For elementary curves (circles and conics) from the gp package, computes: - the point P of parameter U, and - the first and second derivative vectors V1 and V2 at this point. The results, P, V1 and V2, are either: - a gp_Pnt point and two gp_Vec vectors, for a curve in 3D space, or - a gp_Pnt2d point and two gp_Vec2d vectors, for a curve in 2D space.
Parameters:
  • U (float) –
  • C (gp_Circ2d) –
  • P (gp_Pnt2d) –
  • V1 (gp_Vec2d) –
  • V2 (gp_Vec2d) –
  • U
  • E (gp_Elips2d) –
  • P
  • V1
  • V2
  • U
  • H (gp_Hypr2d) –
  • P
  • V1
  • V2
  • U
  • Prb (gp_Parab2d) –
  • P
  • V1
  • V2
  • U
  • C
  • P
  • V1
  • V2
  • U
  • E
  • P
  • V1
  • V2
  • U
  • H
  • P
  • V1
  • V2
  • U
  • Prb
  • P
  • V1
  • V2
Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

elclib_D3(*args)
  • For elementary curves (circles, ellipses and hyperbolae) from the gp package, computes: - the point P of parameter U, and - the first, second and third derivative vectors V1, V2 and V3 at this point. The results, P, V1, V2 and V3, are either: - a gp_Pnt point and three gp_Vec vectors, for a curve in 3D space, or - a gp_Pnt2d point and three gp_Vec2d vectors, for a curve in 2D space.
Parameters:
Return type:

void

Return type:

void

Return type:

void

Return type:

void

Return type:

void

  • In the following functions N is the order of derivation and should be greater than 0
Parameters:
Return type:

void

elclib_DN(*args)
  • For elementary curves (lines, circles and conics) from the gp package, computes the vector corresponding to the Nth derivative at the point of parameter U. The result is either: - a gp_Vec vector for a curve in 3D space, or - a gp_Vec2d vector for a curve in 2D space. In the following functions N is the order of derivation and should be greater than 0
Parameters:
Return type:

gp_Vec

Return type:

gp_Vec

Return type:

gp_Vec

Return type:

gp_Vec

Return type:

gp_Vec

Return type:

gp_Vec2d

Return type:

gp_Vec2d

Return type:

gp_Vec2d

Return type:

gp_Vec2d

Return type:

gp_Vec2d

elclib_EllipseD1(*args)
Parameters:
Return type:

void

Return type:

void

elclib_EllipseD2(*args)
Parameters:
Return type:

void

Return type:

void

elclib_EllipseD3(*args)
Parameters:
Return type:

void

Return type:

void

elclib_EllipseDN(*args)
Parameters:
  • U (float) –
  • Pos (gp_Ax22d) –
  • MajorRadius (float) –
  • MinorRadius (float) –
  • N (int) –
  • U
  • Pos
  • MajorRadius
  • MinorRadius
  • N
Return type:

gp_Vec

Return type:

gp_Vec2d

elclib_EllipseParameter(*args)
Parameters:
Return type:

float

  • Pos is the Axis of the Ellipse parametrization In the local coordinate system of the Ellipse X (U) = MajorRadius * Cos (U) Y (U) = MinorRadius * Sin (U)
Parameters:
Return type:

float

elclib_EllipseValue(*args)
Parameters:
  • U (float) –
  • Pos (gp_Ax22d) –
  • MajorRadius (float) –
  • MinorRadius (float) –
  • U
  • Pos
  • MajorRadius
  • MinorRadius
Return type:

gp_Pnt

Return type:

gp_Pnt2d

elclib_HyperbolaD1(*args)
Parameters:
Return type:

void

Return type:

void

elclib_HyperbolaD2(*args)
Parameters:
Return type:

void

Return type:

void

elclib_HyperbolaD3(*args)
Parameters:
Return type:

void

  • In the following functions N is the order of derivation and should be greater than 0
Parameters:
Return type:

void

elclib_HyperbolaDN(*args)
Parameters:
  • U (float) –
  • Pos (gp_Ax22d) –
  • MajorRadius (float) –
  • MinorRadius (float) –
  • N (int) –
  • U
  • Pos
  • MajorRadius
  • MinorRadius
  • N
Return type:

gp_Vec

Return type:

gp_Vec2d

elclib_HyperbolaParameter(*args)
Parameters:
Return type:

float

  • Pos is the Axis of the Hyperbola parametrization In the local coordinate system of the Hyperbola X (U) = MajorRadius * Ch (U) Y (U) = MinorRadius * Sh (U)
Parameters:
Return type:

float

elclib_HyperbolaValue(*args)
Parameters:
  • U (float) –
  • Pos (gp_Ax22d) –
  • MajorRadius (float) –
  • MinorRadius (float) –
  • U
  • Pos
  • MajorRadius
  • MinorRadius
Return type:

gp_Pnt

Return type:

gp_Pnt2d

elclib_InPeriod(*args)
  • Return a value in the range <UFirst, ULast> by adding or removing the period <ULast - UFirst> to <U>.
Parameters:
Return type:

float

elclib_LineD1(*args)
Parameters:
Return type:

void

Return type:

void

elclib_LineDN(*args)
  • In the following functions N is the order of derivation and should be greater than 0
Parameters:
Return type:

gp_Vec

Return type:

gp_Vec2d

elclib_LineParameter(*args)
Parameters:
Return type:

float

  • parametrization P (U) = L.Location() + U * L.Direction()
Parameters:
Return type:

float

elclib_LineValue(*args)
  • Curve evaluation The following basis functions compute the derivatives on elementary curves defined by their geometric characteristics. These functions can be called without constructing a conic from package gp. They are called by the previous functions. Example : A circle is defined by its position and its radius.
Parameters:
Return type:

gp_Pnt

Return type:

gp_Pnt2d

elclib_ParabolaD1(*args)
Parameters:
Return type:

void

Return type:

void

elclib_ParabolaD2(*args)
Parameters:
Return type:

void

Return type:

void

elclib_ParabolaDN(*args)
Parameters:
Return type:

gp_Vec

  • The following functions compute the parametric value corresponding to a given point on a elementary curve. The point should be on the curve.
Parameters:
Return type:

gp_Vec2d

elclib_ParabolaParameter(*args)
Parameters:
Return type:

float

  • Pos is the mirror axis of the parabola parametrization In the local coordinate system of the parabola Y**2 = (2*P) * X where P is the distance between the focus and the directrix. The following functions build a 3d curve from a 2d curve at a given position defined with an Ax2.
Parameters:
Return type:

float

elclib_ParabolaValue(*args)
Parameters:
Return type:

gp_Pnt

Return type:

gp_Pnt2d

elclib_Parameter(*args)
  • Computes the parameter value of the point P on the given curve. Note: In its local coordinate system, the parametric equation of the curve is given by the following: - for the line L: P(U) = Po + U*Vo where Po is the origin and Vo the unit vector of its positioning axis. - for the circle C: X(U) = Radius*Cos(U), Y(U) = Radius*Sin(U) - for the ellipse E: X(U) = MajorRadius*Cos(U). Y(U) = MinorRadius*Sin(U) - for the hyperbola H: X(U) = MajorRadius*Ch(U), Y(U) = MinorRadius*Sh(U) - for the parabola Prb: X(U) = U**2 / (2*p) Y(U) = U where p is the distance between the focus and the directrix. Warning The point P must be on the curve. These functions are not protected, however, and if point P is not on the curve, an exception may be raised.
Parameters:
Return type:

float

  • parametrization P (U) = L.Location() + U * L.Direction()
Parameters:
Return type:

float

Return type:

float

  • parametrization In the local coordinate system of the circle X (U) = Radius * Cos (U) Y (U) = Radius * Sin (U)
Parameters:
Return type:

float

Return type:

float

  • parametrization In the local coordinate system of the Ellipse X (U) = MajorRadius * Cos (U) Y (U) = MinorRadius * Sin (U)
Parameters:
Return type:

float

Return type:

float

  • parametrization In the local coordinate system of the Hyperbola X (U) = MajorRadius * Ch (U) Y (U) = MinorRadius * Sh (U)
Parameters:
Return type:

float

Return type:

float

  • parametrization In the local coordinate system of the parabola Y**2 = (2*P) * X where P is the distance between the focus and the directrix.
Parameters:
Return type:

float

elclib_To3d(*args)
Parameters:
Return type:

gp_Pnt

Return type:

gp_Vec

Return type:

gp_Dir

Return type:

gp_Ax1

Return type:

gp_Ax2

Return type:

gp_Lin

Return type:

gp_Circ

Return type:

gp_Elips

Return type:

gp_Hypr

  • These functions build a 3D geometric entity from a 2D geometric entity. The ‘X Axis’ and the ‘Y Axis’ of the global coordinate system (i.e. 2D space) are lined up respectively with the ‘X Axis’ and ‘Y Axis’ of the 3D coordinate system, Pos.
Parameters:
Return type:

gp_Parab

elclib_Value(*args)
  • For elementary curves (lines, circles and conics) from the gp package, computes the point of parameter U. The result is either: - a gp_Pnt point for a curve in 3D space, or - a gp_Pnt2d point for a curve in 2D space.
Parameters:
Return type:

gp_Pnt

Return type:

gp_Pnt

Return type:

gp_Pnt

Return type:

gp_Pnt

Return type:

gp_Pnt

Return type:

gp_Pnt2d

Return type:

gp_Pnt2d

Return type:

gp_Pnt2d

Return type:

gp_Pnt2d

Return type:

gp_Pnt2d

register_handle(handle, base_object)

Inserts the handle into the base object to prevent memory corruption in certain cases