OCC.Geom2d module¶

class
Geom2d_AxisPlacement
(*args)¶ Bases:
OCC.Geom2d.Geom2d_Geometry
 Constructs an axis by conversion of the gp_Ax2d axis A.
Parameters: A (gp_Ax2d) – Return type: None  Constructs an axis from a given origin P and unit vector V.
Parameters: Return type: 
Angle
()¶  Computes the angle between the ‘Direction’ of two axis placement in radians. The result is comprised between Pi and Pi.
Parameters: Other (Handle_Geom2d_AxisPlacement &) – Return type: float

GetHandle
()¶

Location
()¶  Returns the ‘Location’ point (origin) of the axis placement. C++: return const&
Return type: gp_Pnt2d

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

SetAxis
()¶  Changes the complete definition of the axis placement.
Parameters: A (gp_Ax2d) – Return type: None

SetDirection
()¶  Changes the ‘Direction’ of the axis placement.
Parameters: V (gp_Dir2d) – Return type: None

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

thisown
¶ The membership flag

class
Geom2d_BSplineCurve
(*args)¶ Bases:
OCC.Geom2d.Geom2d_BoundedCurve
 Creates a nonrational B_spline curve on the basis <Knots, Multiplicities> of degree <Degree>. The following conditions must be verified. 0 < Degree <= MaxDegree. //! Knots.Length() == Mults.Length() >= 2 //! Knots(i) < Knots(i+1) (Knots are increasing) //! 1 <= Mults(i) <= Degree //! On a non periodic curve the first and last multiplicities may be Degree+1 (this is even recommanded if you want the curve to start and finish on the first and last pole). //! On a periodic curve the first and the last multicities must be the same. //! on nonperiodic curves //! Poles.Length() == Sum(Mults(i))  Degree  1 >= 2 //! on periodic curves //! Poles.Length() == Sum(Mults(i)) except the first or last
Parameters:  Poles (TColgp_Array1OfPnt2d) –
 Knots (TColStd_Array1OfReal &) –
 Multiplicities (TColStd_Array1OfInteger &) –
 Degree (int) –
 Periodic (bool) – default value is Standard_False
Return type:  Creates a rational B_spline curve on the basis <Knots, Multiplicities> of degree <Degree>. The following conditions must be verified. 0 < Degree <= MaxDegree. //! Knots.Length() == Mults.Length() >= 2 //! Knots(i) < Knots(i+1) (Knots are increasing) //! 1 <= Mults(i) <= Degree //! On a non periodic curve the first and last multiplicities may be Degree+1 (this is even recommanded if you want the curve to start and finish on the first and last pole). //! On a periodic curve the first and the last multicities must be the same. //! on nonperiodic curves //! Poles.Length() == Sum(Mults(i))  Degree  1 >= 2 //! on periodic curves //! Poles.Length() == Sum(Mults(i)) except the first or last
Parameters:  Poles (TColgp_Array1OfPnt2d) –
 Weights (TColStd_Array1OfReal &) –
 Knots (TColStd_Array1OfReal &) –
 Multiplicities (TColStd_Array1OfInteger &) –
 Degree (int) –
 Periodic (bool) – default value is Standard_False
Return type: 
Degree
()¶  Returns the degree of this BSpline curve. In this class the degree of the basis normalized Bspline functions cannot be greater than ‘MaxDegree’ Computation of value and derivatives
Return type: int

FirstUKnotIndex
()¶  For a Bspline curve the first parameter (which gives the start point of the curve) is a knot value but if the multiplicity of the first knot index is lower than Degree + 1 it is not the first knot of the curve. This method computes the index of the knot corresponding to the first parameter.
Return type: int

GetHandle
()¶

IncreaseDegree
()¶  Increases the degree of this BSpline curve to Degree. As a result, the poles, weights and multiplicities tables are modified; the knots table is not changed. Nothing is done if Degree is less than or equal to the current degree. Exceptions Standard_ConstructionError if Degree is greater than Geom2d_BSplineCurve::MaxDegree().
Parameters: Degree (int) – Return type: None

IncreaseMultiplicity
()¶  Increases the multiplicity of the knot <Index> to <M>. //! If <M> is lower or equal to the current multiplicity nothing is done. If <M> is higher than the degree the degree is used. If <Index> is not in [FirstUKnotIndex, LastUKnotIndex]
Parameters: Return type:  Increases the multiplicities of the knots in [I1,I2] to <M>. //! For each knot if <M> is lower or equal to the current multiplicity nothing is done. If <M> is higher than the degree the degree is used. As a result, the poles and weights tables of this curve are modified. Warning It is forbidden to modify the multiplicity of the first or last knot of a nonperiodic curve. Be careful as Geom2d does not protect against this. Exceptions Standard_OutOfRange if either Index, I1 or I2 is outside the bounds of the knots table.
Parameters: Return type:

IncrementMultiplicity
()¶  Increases by M the multiplicity of the knots of indexes I1 to I2 in the knots table of this BSpline curve. For each knot, the resulting multiplicity is limited to the degree of this curve. If M is negative, nothing is done. As a result, the poles and weights tables of this BSpline curve are modified. Warning It is forbidden to modify the multiplicity of the first or last knot of a nonperiodic curve. Be careful as Geom2d does not protect against this. Exceptions Standard_OutOfRange if I1 or I2 is outside the bounds of the knots table.
Parameters: Return type:

InsertKnot
()¶  Inserts a knot value in the sequence of knots. If <U> is an existing knot the multiplicity is increased by <M>. //! If U is not on the parameter range nothing is done. //! If the multiplicity is negative or null nothing is done. The new multiplicity is limited to the degree. //! The tolerance criterion for knots equality is the max of Epsilon(U) and ParametricTolerance. Warning  If U is less than the first parameter or greater than the last parameter of this BSpline curve, nothing is done.  If M is negative or null, nothing is done.  The multiplicity of a knot is limited to the degree of this BSpline curve.
Parameters: Return type:

InsertKnots
()¶  Inserts the values of the array Knots, with the respective multiplicities given by the array Mults, into the knots table of this BSpline curve. If a value of the array Knots is an existing knot, its multiplicity is:  increased by M, if Add is true, or  increased to M, if Add is false (default value). The tolerance criterion used for knot equality is the larger of the values ParametricTolerance (defaulted to 0.) and Standard_Real::Epsilon(U), where U is the current knot value. Warning  For a value of the array Knots which is less than the first parameter or greater than the last parameter of this BSpline curve, nothing is done.  For a value of the array Mults which is negative or null, nothing is done.  The multiplicity of a knot is limited to the degree of this BSpline curve.
Parameters: Return type:

InsertPoleAfter
()¶  The new pole is inserted after the pole of range Index. If the curve was non rational it can become rational. //! Raised if the Bspline is NonUniform or PiecewiseBezier or if Weight <= 0.0 Raised if Index is not in the range [1, Number of Poles]
Parameters: Return type:

InsertPoleBefore
()¶  The new pole is inserted before the pole of range Index. If the curve was non rational it can become rational. //! Raised if the Bspline is NonUniform or PiecewiseBezier or if Weight <= 0.0 Raised if Index is not in the range [1, Number of Poles]
Parameters: Return type:

IsRational
()¶  Returns True if the weights are not identical. The tolerance criterion is Epsilon of the class Real.
Return type: bool

Knot
()¶  Returns the knot of range Index. When there is a knot with a multiplicity greater than 1 the knot is not repeated. The method Multiplicity can be used to get the multiplicity of the Knot. Raised if Index < 1 or Index > NbKnots
Parameters: Index (int) – Return type: float

KnotDistribution
()¶  Returns NonUniform or Uniform or QuasiUniform or PiecewiseBezier. If all the knots differ by a positive constant from the preceding knot the BSpline Curve can be :  Uniform if all the knots are of multiplicity 1,  QuasiUniform if all the knots are of multiplicity 1 except for the first and last knot which are of multiplicity Degree + 1,  PiecewiseBezier if the first and last knots have multiplicity Degree + 1 and if interior knots have multiplicity Degree A piecewise Bezier with only two knots is a BezierCurve. else the curve is non uniform. The tolerance criterion is Epsilon from class Real.
Return type: GeomAbs_BSplKnotDistribution

KnotSequence
()¶  Returns the knots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. Example : K = {k1, k1, k1, k2, k3, k3, k4, k4, k4} //! Raised if the length of K is not equal to NbPoles + Degree + 1
Parameters: K (TColStd_Array1OfReal &) – Return type: None

Knots
()¶  returns the knot values of the Bspline curve; //! Raised if the length of K is not equal to the number of knots.
Parameters: K (TColStd_Array1OfReal &) – Return type: None

LastUKnotIndex
()¶  For a BSpline curve the last parameter (which gives the end point of the curve) is a knot value but if the multiplicity of the last knot index is lower than Degree + 1 it is not the last knot of the curve. This method computes the index of the knot corresponding to the last parameter.
Return type: int

LocalD1
()¶  Raised if the local continuity of the curve is not C1 between the knot K1 and the knot K2. Raised if FromK1 = ToK2. //! Raised if FromK1 and ToK2 are not in the range [FirstUKnotIndex, LastUKnotIndex].
Parameters: Return type:

LocalD2
()¶  Raised if the local continuity of the curve is not C2 between the knot K1 and the knot K2. Raised if FromK1 = ToK2. //! Raised if FromK1 and ToK2 are not in the range [FirstUKnotIndex, LastUKnotIndex].
Parameters: Return type:

LocalD3
()¶  Raised if the local continuity of the curve is not C3 between the knot K1 and the knot K2. Raised if FromK1 = ToK2. //! Raised if FromK1 and ToK2 are not in the range [FirstUKnotIndex, LastUKnotIndex].
Parameters: Return type:

LocalDN
()¶  Raised if the local continuity of the curve is not CN between the knot K1 and the knot K2. Raised if FromK1 = ToK2. Raised if N < 1. //! Raises if FromK1 and ToK2 are not in the range [FirstUKnotIndex, LastUKnotIndex].
Parameters: Return type:

LocalValue
()¶  Raised if FromK1 = ToK2. //! Raised if FromK1 and ToK2 are not in the range [FirstUKnotIndex, LastUKnotIndex].
Parameters: Return type:

LocateU
()¶  Locates the parametric value U in the sequence of knots. If ‘WithKnotRepetition’ is True we consider the knot’s representation with repetition of multiple knot value, otherwise we consider the knot’s representation with no repetition of multiple knot values. Knots (I1) <= U <= Knots (I2) . if I1 = I2 U is a knot value (the tolerance criterion ParametricTolerance is used). . if I1 < 1 => U < Knots (1)  Abs(ParametricTolerance) . if I2 > NbKnots => U > Knots (NbKnots) + Abs(ParametricTolerance)
Parameters: Return type:

static
MaxDegree
(*args)¶  Returns the value of the maximum degree of the normalized Bspline basis functions in this package.
Return type: int

MovePoint
()¶  Moves the point of parameter U of this BSpline curve to P. Index1 and Index2 are the indexes in the table of poles of this BSpline curve of the first and last poles designated to be moved. FirstModifiedPole and LastModifiedPole are the indexes of the first and last poles, which are effectively modified. In the event of incompatibility between Index1, Index2 and the value U:  no change is made to this BSpline curve, and  the FirstModifiedPole and LastModifiedPole are returned null. Exceptions Standard_OutOfRange if:  Index1 is greater than or equal to Index2, or  Index1 or Index2 is less than 1 or greater than the number of poles of this BSpline curve.
Parameters: Return type:

MovePointAndTangent
()¶  Move a point with parameter U to P. and makes it tangent at U be Tangent. StartingCondition = 1 means first can move EndingCondition = 1 means last point can move StartingCondition = 0 means the first point cannot move EndingCondition = 0 means the last point cannot move StartingCondition = 1 means the first point and tangent cannot move EndingCondition = 1 means the last point and tangent cannot move and so forth ErrorStatus != 0 means that there are not enought degree of freedom with the constrain to deform the curve accordingly
Parameters: Return type:

Multiplicities
()¶  Returns the multiplicity of the knots of the curve. //! Raised if the length of M is not equal to NbKnots.
Parameters: M (TColStd_Array1OfInteger &) – Return type: None

Multiplicity
()¶  Returns the multiplicity of the knots of range Index. Raised if Index < 1 or Index > NbKnots
Parameters: Index (int) – Return type: int

NbKnots
()¶  Returns the number of knots. This method returns the number of knot without repetition of multiple knots.
Return type: int

PeriodicNormalization
()¶  Computes the parameter normalized within the ‘first’ period of this BSpline curve, if it is periodic: the returned value is in the range Param1 and Param1 + Period, where:  Param1 is the ‘first parameter’, and  Period the period of this BSpline curve. Note: If this curve is not periodic, U is not modified.
Parameters: U (float &) – Return type: None

Pole
()¶  Returns the pole of range Index. Raised if Index < 1 or Index > NbPoles.
Parameters: Index (int) – Return type: gp_Pnt2d

Poles
()¶  Returns the poles of the Bspline curve; //! Raised if the length of P is not equal to the number of poles.
Parameters: P (TColgp_Array1OfPnt2d) – Return type: None

RemoveKnot
()¶  Reduces the multiplicity of the knot of index Index to M. If M is equal to 0, the knot is removed. With a modification of this type, the array of poles is also modified. Two different algorithms are systematically used to compute the new poles of the curve. If, for each pole, the distance between the pole calculated using the first algorithm and the same pole calculated using the second algorithm, is less than Tolerance, this ensures that the curve is not modified by more than Tolerance. Under these conditions, true is returned; otherwise, false is returned. A low tolerance is used to prevent modification of the curve. A high tolerance is used to ‘smooth’ the curve. Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table.
Parameters: Return type:

RemovePole
()¶  Removes the pole of range Index If the curve was rational it can become non rational. //! Raised if the Bspline is NonUniform or PiecewiseBezier. Raised if the number of poles of the Bspline curve is lower or equal to 2 before removing. Raised if Index is not in the range [1, Number of Poles]
Parameters: Index (int) – Return type: None

Resolution
()¶  Computes for this BSpline curve the parametric tolerance UTolerance for a given tolerance Tolerance3D (relative to dimensions in the plane). If f(t) is the equation of this BSpline curve, UTolerance ensures that:  t1  t0 < Utolerance ===> f(t1)  f(t0) < ToleranceUV
Parameters:  ToleranceUV (float) –
 UTolerance (float &) –
Return type:

Segment
()¶  Modifies this BSpline curve by segmenting it between U1 and U2. Either of these values can be outside the bounds of the curve, but U2 must be greater than U1. All data structure tables of this BSpline curve are modified, but the knots located between U1 and U2 are retained. The degree of the curve is not modified. Warnings : Even if <self> is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the curve <self> or if the curve makes loop. After the segmentation the length of a curve can be null.  The segmentation of a periodic curve over an interval corresponding to its period generates a nonperiodic curve with equivalent geometry. Exceptions Standard_DomainError if U2 is less than U1. raises if U2 < U1.
Parameters: Return type:

SetKnot
()¶  Modifies this BSpline curve by assigning the value K to the knot of index Index in the knots table. This is a relatively local modification because K must be such that: Knots(Index  1) < K < Knots(Index + 1) Exceptions Standard_ConstructionError if:  K is not such that: Knots(Index  1) < K < Knots(Index + 1)  M is greater than the degree of this BSpline curve or lower than the previous multiplicity of knot of index Index in the knots table. Standard_OutOfRange if Index is outside the bounds of the knots table.
Parameters: Return type:  Modifies this BSpline curve by assigning the value K to the knot of index Index in the knots table. This is a relatively local modification because K must be such that: Knots(Index  1) < K < Knots(Index + 1) The second syntax allows you also to increase the multiplicity of the knot to M (but it is not possible to decrease the multiplicity of the knot with this function). Exceptions Standard_ConstructionError if:  K is not such that: Knots(Index  1) < K < Knots(Index + 1)  M is greater than the degree of this BSpline curve or lower than the previous multiplicity of knot of index Index in the knots table. Standard_OutOfRange if Index is outside the bounds of the knots table.
Parameters: Return type:

SetKnots
()¶  Modifies this BSpline curve by assigning the array K to its knots table. The multiplicity of the knots is not modified. Exceptions Standard_ConstructionError if the values in the array K are not in ascending order. Standard_OutOfRange if the bounds of the array K are not respectively 1 and the number of knots of this BSpline curve.
Parameters: K (TColStd_Array1OfReal &) – Return type: None

SetNotPeriodic
()¶  Changes this BSpline curve into a nonperiodic curve. If this curve is already nonperiodic, it is not modified. Note that the poles and knots tables are modified. Warning If this curve is periodic, as the multiplicity of the first and last knots is not modified, and is not equal to Degree + 1, where Degree is the degree of this BSpline curve, the start and end points of the curve are not its first and last poles.
Return type: None

SetOrigin
()¶  Assigns the knot of index Index in the knots table as the origin of this periodic BSpline curve. As a consequence, the knots and poles tables are modified. Exceptions Standard_NoSuchObject if this curve is not periodic. Standard_DomainError if Index is outside the bounds of the knots table.
Parameters: Index (int) – Return type: None

SetPeriodic
()¶  Changes this BSpline curve into a periodic curve. To become periodic, the curve must first be closed. Next, the knot sequence must be periodic. For this, FirstUKnotIndex and LastUKnotIndex are used to compute I1 and I2, the indexes in the knots array of the knots corresponding to the first and last parameters of this BSpline curve. The period is therefore Knot(I2)  Knot(I1). Consequently, the knots and poles tables are modified. Exceptions Standard_ConstructionError if this BSpline curve is not closed.
Return type: None

SetPole
()¶  Modifies this BSpline curve by assigning P to the pole of index Index in the poles table. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table. Standard_ConstructionError if Weight is negative or null.
Parameters: Return type:  Modifies this BSpline curve by assigning P to the pole of index Index in the poles table. The second syntax also allows you to modify the weight of the modified pole, which becomes Weight. In this case, if this BSpline curve is nonrational, it can become rational and vice versa. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table. Standard_ConstructionError if Weight is negative or null.
Parameters: Return type:

SetWeight
()¶  Assigns the weight Weight to the pole of index Index of the poles table. If the curve was non rational it can become rational. If the curve was rational it can become non rational. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table. Standard_ConstructionError if Weight is negative or null.
Parameters: Return type:

Weight
()¶  Returns the weight of the pole of range Index . Raised if Index < 1 or Index > NbPoles.
Parameters: Index (int) – Return type: float

Weights
()¶  Returns the weights of the Bspline curve; //! Raised if the length of W is not equal to NbPoles.
Parameters: W (TColStd_Array1OfReal &) – Return type: None

thisown
¶ The membership flag

Geom2d_BSplineCurve_MaxDegree
(*args)¶  Returns the value of the maximum degree of the normalized Bspline basis functions in this package.
Return type: int

class
Geom2d_BezierCurve
(*args)¶ Bases:
OCC.Geom2d.Geom2d_BoundedCurve
 Creates a non rational Bezier curve with a set of poles : CurvePoles. The weights are defaulted to all being 1. Raises ConstructionError if the number of poles is greater than MaxDegree + 1 or lower than 2.
Parameters: CurvePoles (TColgp_Array1OfPnt2d) – Return type: None  Creates a rational Bezier curve with the set of poles CurvePoles and the set of weights PoleWeights . If all the weights are identical the curve is considered as non rational. Raises ConstructionError if the number of poles is greater than MaxDegree + 1 or lower than 2 or CurvePoles and CurveWeights have not the same length or one weight value is lower or equal to Resolution from package gp.
Parameters:  CurvePoles (TColgp_Array1OfPnt2d) –
 PoleWeights (TColStd_Array1OfReal &) –
Return type: 
Degree
()¶  Returns the polynomial degree of the curve. It is the number of poles less one. In this package the Degree of a Bezier curve cannot be greater than ‘MaxDegree’.
Return type: int

GetHandle
()¶

Increase
()¶  Increases the degree of a bezier curve. Degree is the new degree of <self>. raises ConstructionError if Degree is greater than MaxDegree or lower than 2 or lower than the initial degree of <self>.
Parameters: Degree (int) – Return type: None

InsertPoleAfter
()¶  Inserts a pole with its weight in the set of poles after the pole of range Index. If the curve was non rational it can become rational if all the weights are not identical. Raised if Index is not in the range [0, NbPoles] //! Raised if the resulting number of poles is greater than MaxDegree + 1.
Parameters: Return type:

InsertPoleBefore
()¶  Inserts a pole with its weight in the set of poles after the pole of range Index. If the curve was non rational it can become rational if all the weights are not identical. Raised if Index is not in the range [1, NbPoles+1] //! Raised if the resulting number of poles is greater than MaxDegree + 1.
Parameters: Return type:

IsRational
()¶  Returns false if all the weights are identical. The tolerance criterion is Resolution from package gp.
Return type: bool

static
MaxDegree
(*args)¶  Returns the value of the maximum polynomial degree of a BezierCurve. This value is 25.
Return type: int

Pole
()¶  Returns the pole of range Index. Raised if Index is not in the range [1, NbPoles]
Parameters: Index (int) – Return type: gp_Pnt2d

Poles
()¶  Returns all the poles of the curve. //! Raised if the length of P is not equal to the number of poles.
Parameters: P (TColgp_Array1OfPnt2d) – Return type: None

RemovePole
()¶  Removes the pole of range Index. If the curve was rational it can become non rational. Raised if Index is not in the range [1, NbPoles]
Parameters: Index (int) – Return type: None

Resolution
()¶  Computes for this Bezier curve the parametric tolerance UTolerance for a given tolerance Tolerance3D (relative to dimensions in the plane). If f(t) is the equation of this Bezier curve, UTolerance ensures that  t1  t0 < Utolerance ===> f(t1)  f(t0) < ToleranceUV
Parameters:  ToleranceUV (float) –
 UTolerance (float &) –
Return type:

Segment
()¶  Segments the curve between U1 and U2 which can be out of the bounds of the curve. The curve is oriented from U1 to U2. The control points are modified, the first and the last point are not the same but the parametrization range is [0, 1] else it could not be a Bezier curve. Warnings : Even if <self> is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the curve <self> or if the curve makes loop. After the segmentation the length of a curve can be null.
Parameters: Return type:

SetPole
()¶  Substitutes the pole of range index with P. If the curve <self> is rational the weight of range Index is not modified. raiseD if Index is not in the range [1, NbPoles]
Parameters: Return type:  Substitutes the pole and the weights of range Index. If the curve <self> is not rational it can become rational if all the weights are not identical. If the curve was rational it can become non rational if all the weights are identical. Raised if Index is not in the range [1, NbPoles] Raised if Weight <= Resolution from package gp
Parameters: Return type:

SetWeight
()¶  Changes the weight of the pole of range Index. If the curve <self> is not rational it can become rational if all the weights are not identical. If the curve was rational it can become non rational if all the weights are identical. Raised if Index is not in the range [1, NbPoles] Raised if Weight <= Resolution from package gp
Parameters: Return type:

Weight
()¶  Returns the weight of range Index. Raised if Index is not in the range [1, NbPoles]
Parameters: Index (int) – Return type: float

Weights
()¶  Returns all the weights of the curve. //! Raised if the length of W is not equal to the number of poles.
Parameters: W (TColStd_Array1OfReal &) – Return type: None

thisown
¶ The membership flag

Geom2d_BezierCurve_MaxDegree
(*args)¶  Returns the value of the maximum polynomial degree of a BezierCurve. This value is 25.
Return type: int

class
Geom2d_BoundedCurve
(*args, **kwargs)¶ Bases:
OCC.Geom2d.Geom2d_Curve

EndPoint
()¶  Returns the end point of the curve. The end point is the value of the curve for the ‘LastParameter’ of the curve.
Return type: gp_Pnt2d

GetHandle
()¶

StartPoint
()¶  Returns the start point of the curve. The start point is the value of the curve for the ‘FirstParameter’ of the curve.
Return type: gp_Pnt2d

thisown
¶ The membership flag


class
Geom2d_CartesianPoint
(*args)¶ Bases:
OCC.Geom2d.Geom2d_Point
 Returns a persistent copy of P.
Parameters: Return type: Return type: 
GetHandle
()¶

thisown
¶ The membership flag

class
Geom2d_Circle
(*args)¶ Bases:
OCC.Geom2d.Geom2d_Conic
 Constructs a circle by conversion of the gp_Circ2d circle C.
Parameters: C (gp_Circ2d) – Return type: None  Constructs a circle of radius Radius, whose center is the origin of axis A; A is the ‘X Axis’ of the local coordinate system of the circle; this coordinate system is direct if Sense is true (default value) or indirect if Sense is false. Note: It is possible to create a circle where Radius is equal to 0.0. Exceptions Standard_ConstructionError if Radius is negative.
Parameters: Return type:  Constructs a circle of radius Radius, where the coordinate system A locates the circle and defines its orientation in the plane such that:  the center of the circle is the origin of A,  the orientation (direct or indirect) of A gives the orientation of the circle.
Parameters: Return type: 
Circ2d
()¶  Returns the non persistent circle from gp with the same geometric properties as <self>.
Return type: gp_Circ2d

GetHandle
()¶

SetCirc2d
()¶  Converts the gp_Circ2d circle C into this circle.
Parameters: C (gp_Circ2d) – Return type: None

thisown
¶ The membership flag

class
Geom2d_Conic
(*args, **kwargs)¶ Bases:
OCC.Geom2d.Geom2d_Curve

Eccentricity
()¶  returns the eccentricity value of the conic e. e = 0 for a circle 0 < e < 1 for an ellipse (e = 0 if MajorRadius = MinorRadius) e > 1 for a hyperbola e = 1 for a parabola
Return type: float

GetHandle
()¶

Location
()¶  Returns the location point of the conic. For the circle, the ellipse and the hyperbola it is the center of the conic. For the parabola it is the vertex of the parabola.
Return type: gp_Pnt2d

SetAxis
()¶  Modifies this conic, redefining its local coordinate system partially, by assigning P as its origin
Parameters: A (gp_Ax22d) – Return type: None

SetLocation
()¶  Modifies this conic, redefining its local coordinate system fully, by assigning A as this coordinate system.
Parameters: P (gp_Pnt2d) – Return type: None

SetYAxis
()¶  Assigns the origin and unit vector of axis A to the origin of the local coordinate system of this conic and either:  its ‘X Direction’, or  its ‘Y Direction’. The other unit vector of the local coordinate system of this conic is recomputed normal to A, without changing the orientation of the local coordinate system (righthanded or lefthanded).
Parameters: A (gp_Ax2d) – Return type: None

XAxis
()¶  Returns the ‘XAxis’ of the conic. This axis defines the origin of parametrization of the conic. This axis and the ‘Yaxis’ define the local coordinate system of the conic. C++: return const&
Return type: gp_Ax2d

YAxis
()¶  Returns the ‘YAxis’ of the conic. The ‘YAxis’ is perpendicular to the ‘Xaxis’.
Return type: gp_Ax2d

thisown
¶ The membership flag


class
Geom2d_Curve
(*args, **kwargs)¶ Bases:
OCC.Geom2d.Geom2d_Geometry

Continuity
()¶  It is the global continuity of the curve : C0 : only geometric continuity, C1 : continuity of the first derivative all along the Curve, C2 : continuity of the second derivative all along the Curve, C3 : continuity of the third derivative all along the Curve, G1 : tangency continuity all along the Curve, G2 : curvature continuity all along the Curve, CN : the order of continuity is infinite.
Return type: GeomAbs_Shape

D0
()¶  Returns in P the point of parameter U. If the curve is periodic then the returned point is P(U) with U = Ustart + (U  Uend) where Ustart and Uend are the parametric bounds of the curve. //! Raised only for the ‘OffsetCurve’ if it is not possible to compute the current point. For example when the first derivative on the basis curve and the offset direction are parallel.
Parameters: Return type: void

D1
()¶  Returns the point P of parameter U and the first derivative V1. Raised if the continuity of the curve is not C1.
Parameters: Return type: void

D2
()¶  Returns the point P of parameter U, the first and second derivatives V1 and V2. Raised if the continuity of the curve is not C2.
Parameters: Return type: void

D3
()¶  Returns the point P of parameter U, the first, the second and the third derivative. Raised if the continuity of the curve is not C3.
Parameters: Return type: void

DN
()¶  For the point of parameter U of this curve, computes the vector corresponding to the Nth derivative. Exceptions StdFail_UndefinedDerivative if:  the continuity of the curve is not ‘CN’, or  the derivative vector cannot be computed easily; this is the case with specific types of curve (for example, a rational BSpline curve where N is greater than 3). Standard_RangeError if N is less than 1.
Parameters: Return type:

FirstParameter
()¶  Returns the value of the first parameter. Warnings : It can be RealFirst or RealLast from package Standard if the curve is infinite
Return type: float

GetHandle
()¶

IsCN
()¶  Returns true if the degree of continuity of this curve is at least N. Exceptions Standard_RangeError if N is less than 0.
Parameters: N (int) – Return type: bool

IsClosed
()¶  Returns true if the curve is closed. Examples : Some curves such as circle are always closed, others such as line are never closed (by definition). Some Curves such as OffsetCurve can be closed or not. These curves are considered as closed if the distance between the first point and the last point of the curve is lower or equal to the Resolution from package gp wich is a fixed criterion independant of the application.
Return type: bool

IsPeriodic
()¶  Returns true if the parameter of the curve is periodic. It is possible only if the curve is closed and if the following relation is satisfied : for each parametric value U the distance between the point P(u) and the point P (u + T) is lower or equal to Resolution from package gp, T is the period and must be a constant. There are three possibilities : . the curve is never periodic by definition (SegmentLine) . the curve is always periodic by definition (Circle) . the curve can be defined as periodic (BSpline). In this case a function SetPeriodic allows you to give the shape of the curve. The general rule for this case is : if a curve can be periodic or not the default periodicity set is non periodic and you have to turn (explicitly) the curve into a periodic curve if you want the curve to be periodic.
Return type: bool

LastParameter
()¶  Value of the last parameter. Warnings : It can be RealFirst or RealLast from package Standard if the curve is infinite
Return type: float

ParametricTransformation
()¶  Returns the coefficient required to compute the parametric transformation of this curve when transformation T is applied. This coefficient is the ratio between the parameter of a point on this curve and the parameter of the transformed point on the new curve transformed by T. Note: this function generally returns 1. but it can be redefined (for example, on a line).
Parameters: T (gp_Trsf2d) – Return type: float

Reverse
()¶  Changes the direction of parametrization of <self>. The ‘FirstParameter’ and the ‘LastParameter’ are not changed but the orientation of the curve is modified. If the curve is bounded the StartPoint of the initial curve becomes the EndPoint of the reversed curve and the EndPoint of the initial curve becomes the StartPoint of the reversed curve.
Return type: void

Reversed
()¶  Creates a reversed duplicate Changes the orientation of this curve. The first and last parameters are not changed, but the parametric direction of the curve is reversed. If the curve is bounded:  the start point of the initial curve becomes the end point of the reversed curve, and  the end point of the initial curve becomes the start point of the reversed curve.  Reversed creates a new curve.
Return type: Handle_Geom2d_Curve

ReversedParameter
()¶  Computes the parameter on the reversed curve for the point of parameter U on this curve. Note: The point of parameter U on this curve is identical to the point of parameter ReversedParameter(U) on the reversed curve.
Parameters: U (float) – Return type: float

TransformedParameter
()¶  Computes the parameter on the curve transformed by T for the point of parameter U on this curve. Note: this function generally returns U but it can be redefined (for example, on a line).
Parameters: Return type:

Value
()¶  Computes the point of parameter U on <self>. If the curve is periodic then the returned point is P(U) with U = Ustart + (U  Uend) where Ustart and Uend are the parametric bounds of the curve. //! it is implemented with D0. //! Raised only for the ‘OffsetCurve’ if it is not possible to compute the current point. For example when the first derivative on the basis curve and the offset direction are parallel.
Parameters: U (float) – Return type: gp_Pnt2d

thisown
¶ The membership flag


class
Geom2d_Direction
(*args)¶ Bases:
OCC.Geom2d.Geom2d_Vector
 Creates a unit vector with it 2 cartesian coordinates. //! Raised if Sqrt( X*X + Y*Y) <= Resolution from gp.
Parameters: Return type:  Creates a persistent copy of <self>.
Parameters: V (gp_Dir2d) – Return type: None 
GetHandle
()¶

SetCoord
()¶  Assigns the coordinates X and Y to this unit vector, then normalizes it. Exceptions Standard_ConstructionError if Sqrt(X*X + Y*Y) is less than or equal to gp::Resolution().
Parameters: Return type:

SetDir2d
()¶  Converts the gp_Dir2d unit vector V into this unit vector.
Parameters: V (gp_Dir2d) – Return type: None

SetX
()¶  Assigns a value to the X coordinate of this unit vector, then normalizes it. Exceptions Standard_ConstructionError if the value assigned causes the magnitude of the vector to become less than or equal to gp::Resolution().
Parameters: X (float) – Return type: None

SetY
()¶  Assigns a value to the Y coordinate of this unit vector, then normalizes it. Exceptions Standard_ConstructionError if the value assigned causes the magnitude of the vector to become less than or equal to gp::Resolution().
Parameters: Y (float) – Return type: None

thisown
¶ The membership flag

class
Geom2d_Ellipse
(*args)¶ Bases:
OCC.Geom2d.Geom2d_Conic
 Creates an ellipse by conversion of the gp_Elips2d ellipse E.
Parameters: E (gp_Elips2d) – Return type: None  Creates an ellipse defined by its major and minor radii, MajorRadius and MinorRadius, and positioned in the plane by its major axis MajorAxis; the center of the ellipse is the origin of MajorAxis and the unit vector of MajorAxis is the ‘X Direction’ of the local coordinate system of the ellipse; this coordinate system is direct if Sense is true (default value) or indirect if Sense is false. Warnings : It is not forbidden to create an ellipse with MajorRadius = MinorRadius. Exceptions Standard_ConstructionError if:  MajorRadius is less than MinorRadius, or  MinorRadius is less than 0.
Parameters: Return type:  Creates an ellipse defined by its major and minor radii, MajorRadius and MinorRadius, where the coordinate system Axis locates the ellipse and defines its orientation in the plane such that:  the center of the ellipse is the origin of Axis,  the ‘X Direction’ of Axis defines the major axis of the ellipse,  the ‘Y Direction’ of Axis defines the minor axis of the ellipse,  the orientation of Axis (direct or indirect) gives the orientation of the ellipse. Warnings : It is not forbidden to create an ellipse with MajorRadius = MinorRadius. Exceptions Standard_ConstructionError if:  MajorRadius is less than MinorRadius, or  MinorRadius is less than 0.
Parameters: Return type: 
Directrix1
()¶  Computes the directrices of this ellipse. 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’. Raises ConstructionError if Eccentricity = 0.0. (The ellipse degenerates into a circle)
Return type: gp_Ax2d

Directrix2
()¶  This line is obtained by the symmetrical transformation of ‘Directrix1’ with respect to the ‘YAxis’ of the ellipse. Raises ConstructionError if Eccentricity = 0.0. (The ellipse degenerates into a circle).
Return type: gp_Ax2d

Elips2d
()¶  Converts this ellipse into a gp_Elips2d ellipse.
Return type: gp_Elips2d

Focal
()¶  Computes the focal distance. The focal distance is the distance between the center and a focus of the ellipse.
Return type: float

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

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

GetHandle
()¶

Parameter
()¶  Computes the parameter of this ellipse. This value is given by the formula p = (1  e * e) * MajorRadius where e is the eccentricity of the ellipse. Returns 0 if MajorRadius = 0
Return type: float

SetElips2d
()¶  Converts the gp_Elips2d ellipse E into this ellipse.
Parameters: E (gp_Elips2d) – Return type: None

SetMajorRadius
()¶  Assigns a value to the major radius of this ellipse. Exceptions Standard_ConstructionError if:  the major radius of this ellipse becomes less than the minor radius, or  MinorRadius is less than 0.
Parameters: MajorRadius (float) – Return type: None

SetMinorRadius
()¶  Assigns a value to the minor radius of this ellipse. Exceptions Standard_ConstructionError if:  the major radius of this ellipse becomes less than the minor radius, or  MinorRadius is less than 0.
Parameters: MinorRadius (float) – Return type: None

thisown
¶ The membership flag

class
Geom2d_Geometry
(*args, **kwargs)¶ Bases:
OCC.MMgt.MMgt_TShared

Copy
()¶ Return type: Handle_Geom2d_Geometry

GetHandle
()¶

Mirror
()¶  Performs the symmetrical transformation of a Geometry with respect to the point P which is the center of the symmetry and assigns the result to this geometric object.
Parameters: P (gp_Pnt2d) – Return type: None  Performs the symmetrical transformation of a Geometry with respect to an axis placement which is the axis of the symmetry.
Parameters: A (gp_Ax2d) – Return type: None

Mirrored
()¶ Parameters: Return type: Return type:

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

Rotated
()¶ Parameters: Return type:

Scale
()¶  Scales a Geometry. S is the scaling value.
Parameters: Return type:

Scaled
()¶ Parameters: Return type:

Transform
()¶  Transformation of a geometric object. This tansformation can be a translation, a rotation, a symmetry, a scaling or a complex transformation obtained by combination of the previous elementaries transformations. (see class Transformation of the package Geom2d). The following transformations have the same properties as the previous ones but they don’t modified the object itself. A copy of the object is returned.
Parameters: T (gp_Trsf2d) – Return type: void

Transformed
()¶ Parameters: T (gp_Trsf2d) – Return type: Handle_Geom2d_Geometry

Translate
()¶  Translates a Geometry. V is the vector of the tanslation.
Parameters: V (gp_Vec2d) – Return type: None  Translates a Geometry from the point P1 to the point P2.
Parameters: Return type:

Translated
()¶ Parameters: Return type: Return type:

thisown
¶ The membership flag


class
Geom2d_Hyperbola
(*args)¶ Bases:
OCC.Geom2d.Geom2d_Conic
 Creates an Hyperbola from a non persistent one from package gp
Parameters: H (gp_Hypr2d) – Return type: None  MajorAxis is the ‘XAxis’ of the hyperbola. The YAxis is in the direct sense if ‘Sense’ is True; The major radius of the hyperbola is on this ‘XAxis’ and the minor radius is on the ‘YAxis’ of the hyperbola. Raised if MajorRadius < 0.0 or if MinorRadius < 0.0
Parameters: Return type:  The XDirection of ‘Axis’ is the ‘XAxis’ of the hyperbola and the YDirection of ‘Axis’ is the ‘YAxis’. The major radius of the hyperbola is on this ‘XAxis’ and the minor radius is on the ‘YAxis’ of the hyperbola. Raised if MajorRadius < 0.0 or if MinorRadius < 0.0
Parameters: Return type: 
Asymptote1
()¶  In the local coordinate system of the hyperbola the equation of the hyperbola is (X*X)/(A*A)  (Y*Y)/(B*B) = 1.0 and the equation of the first asymptote is Y = (B/A)*X where A is the major radius of the hyperbola and B is the minor radius of the hyperbola. Raised if MajorRadius = 0.0
Return type: gp_Ax2d

Asymptote2
()¶  In the local coordinate system of the hyperbola the equation of the hyperbola is (X*X)/(A*A)  (Y*Y)/(B*B) = 1.0 and the equation of the first asymptote is Y = (B/A)*X. where A is the major radius of the hyperbola and B is the minor radius of the hyperbola. raised if MajorRadius = 0.0
Return type: gp_Ax2d

ConjugateBranch1
()¶  Computes the first conjugate branch relative to this hyperbola. Note: The diagram given under the class purpose indicates where these two branches of hyperbola are positioned in relation to this branch of hyperbola.
Return type: gp_Hypr2d

ConjugateBranch2
()¶  Computes the second conjugate branch relative to this hyperbola. Note: The diagram given under the class purpose indicates where these two branches of hyperbola are positioned in relation to this branch of hyperbola.
Return type: gp_Hypr2d

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 directrix1 and the ‘XAxis’ is the location point of the directrix1. This point is on the positive side of the ‘XAxis’.
Return type: gp_Ax2d

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

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

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

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

GetHandle
()¶

MajorRadius
()¶  Returns the major or minor radius of this hyperbola. The major radius is also the distance between the center of the hyperbola and the apex of the main branch (located on the ‘X Axis’ of the hyperbola).
Return type: float

MinorRadius
()¶  Returns the major or minor radius of this hyperbola. The minor radius is also the distance between the center of the hyperbola and the apex of a conjugate branch (located on the ‘Y Axis’ of the hyperbola).
Return type: float

OtherBranch
()¶  Computes the ‘other’ branch of this hyperbola. This is a symmetrical branch with respect to the center of this hyperbola. Note: The diagram given under the class purpose indicates where the ‘other’ branch is positioned in relation to this branch of the hyperbola. ^ YAxis  FirstConjugateBranch  Other  Main ————————— C ——————————————>XAxis Branch  Branch   SecondConjugateBranch  Warning The major radius can be less than the minor radius.
Return type: gp_Hypr2d

Parameter
()¶  Computes the parameter of this hyperbola. The parameter is: p = (e*e  1) * MajorRadius where e is the eccentricity of this hyperbola and MajorRadius its major radius. Exceptions Standard_DomainError if the major radius of this hyperbola is null.
Return type: float

SetHypr2d
()¶  Converts the gp_Hypr2d hyperbola H into this hyperbola.
Parameters: H (gp_Hypr2d) – Return type: None

SetMajorRadius
()¶  Assigns a value to the major or minor radius of this hyperbola. Exceptions Standard_ConstructionError if:  MajorRadius is less than 0.0,  MinorRadius is less than 0.0.
Parameters: MajorRadius (float) – Return type: None

SetMinorRadius
()¶  Assigns a value to the major or minor radius of this hyperbola. Exceptions Standard_ConstructionError if:  MajorRadius is less than 0.0,  MinorRadius is less than 0.0.
Parameters: MinorRadius (float) – Return type: None

thisown
¶ The membership flag

class
Geom2d_Line
(*args)¶ Bases:
OCC.Geom2d.Geom2d_Curve
 Creates a line located in 2D space with the axis placement A. The Location of A is the origin of the line.
Parameters: A (gp_Ax2d) – Return type: None  Creates a line by conversion of the gp_Lin2d line L.
Parameters: L (gp_Lin2d) – Return type: None  Constructs a line passing through point P and parallel to vector V (P and V are, respectively, the origin and the unit vector of the positioning axis of the line).
Parameters: Return type: 
Distance
()¶  Computes the distance between <self> and the point P.
Parameters: P (gp_Pnt2d) – Return type: float

GetHandle
()¶

Lin2d
()¶  Returns non persistent line from gp with the same geometric properties as <self>
Return type: gp_Lin2d

SetLin2d
()¶  Set <self> so that <self> has the same geometric properties as L.
Parameters: L (gp_Lin2d) – Return type: None

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

SetPosition
()¶  Changes the ‘Location’ and a the ‘Direction’ of <self>.
Parameters: A (gp_Ax2d) – Return type: None

thisown
¶ The membership flag

class
Geom2d_OffsetCurve
(*args)¶ Bases:
OCC.Geom2d.Geom2d_Curve
 Constructs a curve offset from the basis curve C, where Offset is the distance between the offset curve and the basis curve at any point. A point on the offset curve is built by measuring the offset value along a normal vector at a point on C. This normal vector is obtained by rotating the vector tangential to C at 90 degrees in the antitrigonometric sense. The side of C on which the offset value is measured is indicated by this normal vector if Offset is positive, or in the inverse sense if Offset is negative. Warnings : In this package the entities are not shared. The OffsetCurve is built with a copy of the curve C. So when C is modified the OffsetCurve is not modified Warning! ConstructionError raised if the basis curve C is not at least C1. No check is done to know if V^Z != 0.0 at any point.
Parameters:  C (Handle_Geom2d_Curve &) –
 Offset (float) –
Return type: 
BasisCurve
()¶  Returns the basis curve of this offset curve. The basis curve can be an offset curve.
Return type: Handle_Geom2d_Curve

D1
()¶  Warning! this should not be called if the continuity of the basis curve is not C2. Nevertheless, it’s OK to use it on portion where the curve is C2
Parameters: Return type:  Warning! this should not be called if the continuity of the basis curve is not C1. Nevertheless, it’s OK to use it on portion where the curve is C1
Parameters: Return type:

D2
()¶  Warning! This should not be called if the continuity of the basis curve is not C3. Nevertheless, it’s OK to use it on portion where the curve is C3
Parameters: Return type:  Warning! this should not be called if the continuity of the basis curve is not C3. Nevertheless, it’s OK to use it on portion where the curve is C3
Parameters: Return type:

GetHandle
()¶

SetBasisCurve
()¶  Changes this offset curve by assigning C as the basis curve from which it is built. Exceptions Standard_ConstructionError if the curve C is not at least ‘C1’ continuous.
Parameters: C (Handle_Geom2d_Curve &) – Return type: None

SetOffsetValue
()¶  Changes this offset curve by assigning D as the offset value.
Parameters: D (float) – Return type: None

Value
()¶  Warning! this should not be called if the basis curve is not at least C1. Nevertheless if used on portion where the curve is C1, it is OK
Parameters: Return type:

thisown
¶ The membership flag

class
Geom2d_Parabola
(*args)¶ Bases:
OCC.Geom2d.Geom2d_Conic
 Creates a parabola from a non persistent one.
Parameters: Prb (gp_Parab2d) – Return type: None  Creates a parabola with its ‘MirrorAxis’ and it’s focal length ‘Focal’. MirrorAxis is the axis of symmetry of the curve, it is the ‘XAxis’. The ‘YAxis’ is parallel to the directrix of the parabola and is in the direct sense if Sense is True. The ‘Location’ point of ‘MirrorAxis’ is the vertex of the parabola Raised if Focal < 0.0
Parameters: Return type:  Creates a parabola with its Axis and it’s focal length ‘Focal’. The XDirection of Axis is the axis of symmetry of the curve, it is the ‘XAxis’. The ‘YAxis’ is parallel to the directrix of the parabola. The ‘Location’ point of ‘Axis’ is the vertex of the parabola. Raised if Focal < 0.0
Parameters: Return type:  D is the directrix of the parabola and F the focus point. The symmetry axis ‘XAxis’ of the parabola is normal to the directrix and pass through the focus point F, but its ‘Location’ point is the vertex of the parabola. The ‘YAxis’ of the parabola is parallel to D and its ‘Location’ point is the vertex of the parabola.
Parameters: Return type: 
Directrix
()¶  The directrix is parallel to the ‘YAxis’ of the parabola. The ‘Location’ point of the directrix is the intersection point between the directrix and the symmetry axis (‘XAxis’) of the parabola.
Return type: gp_Ax2d

Focal
()¶  Computes the focal length of this parabola. The focal length is the distance between the apex and the focus of the parabola.
Return type: float

Focus
()¶  Computes the focus of this parabola The focus is on the positive side of the ‘X Axis’ of the local coordinate system of the parabola.
Return type: gp_Pnt2d

GetHandle
()¶

Parab2d
()¶  Returns the non persistent parabola from gp with the same geometric properties as <self>.
Return type: gp_Parab2d

Parameter
()¶  Computes the parameter of this parabola, which is the distance between its focus and its directrix. This distance is twice the focal length. If P is the parameter of the parabola, the equation of the parabola in its local coordinate system is: Y**2 = 2.*P*X.
Return type: float

SetFocal
()¶  Assigns the value Focal to the focal length of this parabola. Exceptions Standard_ConstructionError if Focal is negative.
Parameters: Focal (float) – Return type: None

SetParab2d
()¶  Converts the gp_Parab2d parabola Prb into this parabola.
Parameters: Prb (gp_Parab2d) – Return type: None

thisown
¶ The membership flag

class
Geom2d_Point
(*args, **kwargs)¶ Bases:
OCC.Geom2d.Geom2d_Geometry

Coord
()¶  returns the Coordinates of <self>.
Parameters:  X (float &) –
 Y (float &) –
Return type: void

Distance
()¶  computes the distance between <self> and <Other>.
Parameters: Other (Handle_Geom2d_Point &) – Return type: float

GetHandle
()¶

SquareDistance
()¶  computes the square distance between <self> and <Other>.
Parameters: Other (Handle_Geom2d_Point &) – Return type: float

thisown
¶ The membership flag


class
Geom2d_Transformation
(*args)¶ Bases:
OCC.MMgt.MMgt_TShared
 Creates an identity transformation.
Return type: None  Creates a persistent copy of T.
Parameters: T (gp_Trsf2d) – Return type: None 
Copy
()¶  Creates a new object, which is a copy of this transformation.
Return type: Handle_Geom2d_Transformation

Form
()¶  Returns the nature of this transformation as a value of the gp_TrsfForm enumeration. Returns the nature of the transformation. It can be Identity, Rotation, Translation, PntMirror, Ax1Mirror, Scale, CompoundTrsf
Return type: gp_TrsfForm

GetHandle
()¶

Invert
()¶  Computes the inverse of this transformation. and assigns the result to this transformatio //! Raised if the the transformation is singular. This means that the ScaleFactor is lower or equal to Resolution from package gp.
Return type: None

Inverted
()¶  Computes the inverse of this transformation and creates a new one. Raises ConstructionError if the the transformation is singular. This means that the ScaleFactor is lower or equal to Resolution from package gp.
Return type: Handle_Geom2d_Transformation

IsNegative
()¶  Checks whether this transformation is an indirect transformation: returns true if the determinant of the matrix of the vectorial part of the transformation is less than 0.
Return type: bool

Multiplied
()¶  Computes the transformation composed with Other and <self>. <self> * Other. Returns a new transformation
Parameters: Other (Handle_Geom2d_Transformation &) – Return type: Handle_Geom2d_Transformation

Multiply
()¶  Computes the transformation composed with Other and <self> . <self> = <self> * Other. //! Computes the following composition of transformations if N > 0 <self> * <self> * .......* <self>. if N = 0 Identity if N < 0 <self>.Invert() * .........* <self>.Invert()
Parameters: Other (Handle_Geom2d_Transformation &) – Return type: None

Power
()¶  Raised if N < 0 and if the transformation is not inversible
Parameters: N (int) – Return type: None

Powered
()¶  Raised if N < 0 and if the transformation is not inversible
Parameters: N (int) – Return type: Handle_Geom2d_Transformation

PreMultiply
()¶  Computes the matrix of the transformation composed with <self> and Other. <self> = Other * <self>
Parameters: Other (Handle_Geom2d_Transformation &) – Return type: None

SetMirror
()¶  Makes the transformation into a symmetrical transformation with respect to a point P. P is the center of the symmetry.
Parameters: P (gp_Pnt2d) – Return type: None  Makes the transformation into a symmetrical transformation with respect to an axis A. A is the center of the axial symmetry.
Parameters: A (gp_Ax2d) – Return type: None

SetRotation
()¶  Assigns to this transformation the geometric properties of a rotation at angle Ang (in radians) about point P.
Parameters: Return type:

SetScale
()¶  Makes the transformation into a scale. P is the center of the scale and S is the scaling value.
Parameters: Return type:

SetTransformation
()¶  Makes a transformation allowing passage from the coordinate system ‘FromSystem1’ to the coordinate system ‘ToSystem2’.
Parameters: Return type:  Makes 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.
Parameters: ToSystem (gp_Ax2d) – Return type: None

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

SetTrsf2d
()¶  Makes the transformation into a transformation T from package gp.
Parameters: T (gp_Trsf2d) – Return type: None

Transforms
()¶  Applies the transformation <self> to the triplet {X, Y}.
Parameters:  X (float &) –
 Y (float &) –
Return type:

Trsf2d
()¶  Converts this transformation into a gp_Trsf2d transformation. Returns a non persistent copy of <self>. C++: return const&
Return type: gp_Trsf2d

Value
()¶  Returns the coefficients of the global matrix of tranformation. It is a 2 rows X 3 columns matrix. //! Raised if Row < 1 or Row > 2 or Col < 1 or Col > 2 //! Computes the reverse transformation.
Parameters: Return type:

thisown
¶ The membership flag

class
Geom2d_TrimmedCurve
(*args)¶ Bases:
OCC.Geom2d.Geom2d_BoundedCurve
 Creates a trimmed curve from the basis curve C limited between U1 and U2. //! . U1 can be greater or lower than U2. . The returned curve is oriented from U1 to U2. . If the basis curve C is periodic there is an ambiguity because two parts are available. In this case by default the trimmed curve has the same orientation as the basis curve (Sense = True). If Sense = False then the orientation of the trimmed curve is opposite to the orientation of the basis curve C. If the curve is closed but not periodic it is not possible to keep the part of the curve including the junction point (except if the junction point is at the beginning or at the end of the trimmed curve) because you could lose the fundamental characteristics of the basis curve which are used for example to compute the derivatives of the trimmed curve. So for a closed curve the rules are the same as for a open curve. Warnings : In this package the entities are not shared. The TrimmedCurve is built with a copy of the curve C. So when C is modified the TrimmedCurve is not modified Warnings : If <C> is periodic, parametrics bounds of the TrimmedCurve, can be different to [<U1>;<U2>}, if <U1> or <U2> are not in the principal period. Include : For more explanation see the scheme given with this class. Raises ConstructionError the C is not periodic and U1 or U2 are out of the bounds of C. Raised if U1 = U2.
Parameters: Return type: 
BasisCurve
()¶  Returns the basis curve. Warning This function does not return a constant reference. Consequently, any modification of the returned value directly modifies the trimmed curve.
Return type: Handle_Geom2d_Curve

GetHandle
()¶

SetTrim
()¶  Changes this trimmed curve, by redefining the parameter values U1 and U2, which limit its basis curve. Note: If the basis curve is periodic, the trimmed curve has the same orientation as the basis curve if Sense is true (default value) or the opposite orientation if Sense is false. Warning If the basis curve is periodic, the bounds of the trimmed curve may be different from U1 and U2 if the parametric origin of the basis curve is within the arc of the trimmed curve. In this case, the modified parameter will be equal to U1 or U2 plus or minus the period. Exceptions Standard_ConstructionError if:  the basis curve is not periodic, and either U1 or U2 are outside the bounds of the basis curve, or  U1 is equal to U2.
Parameters: Return type:

thisown
¶ The membership flag

class
Geom2d_Vector
(*args, **kwargs)¶ Bases:
OCC.Geom2d.Geom2d_Geometry

Angle
()¶  Computes the angular value, in radians, between this vector and vector Other. The result is a value between Pi and Pi. The orientation is from this vector to vector Other. Raises VectorWithNullMagnitude if one of the two vectors is a vector with null magnitude because the angular value is indefinite.
Parameters: Other (Handle_Geom2d_Vector &) – Return type: float

Coord
()¶  Returns the coordinates of <self>.
Parameters:  X (float &) –
 Y (float &) –
Return type:

Crossed
()¶  Cross product of <self> with the vector <Other>.
Parameters: Other (Handle_Geom2d_Vector &) – Return type: float

Dot
()¶  Returns the scalar product of 2 Vectors.
Parameters: Other (Handle_Geom2d_Vector &) – Return type: float

GetHandle
()¶

Reversed
()¶  Returns a copy of <self> reversed.
Return type: Handle_Geom2d_Vector

thisown
¶ The membership flag


class
Geom2d_VectorWithMagnitude
(*args)¶ Bases:
OCC.Geom2d.Geom2d_Vector
 Creates a persistent copy of V.
Parameters: V (gp_Vec2d) – Return type: None  Creates a vector with two cartesian coordinates.
Parameters: Return type:  Creates a vector from the point P1 to the point P2. The magnitude of the vector is the distance between P1 and P2
Parameters: Return type: 
Add
()¶  Adds the Vector Other to <self>.
Parameters: Other (Handle_Geom2d_Vector &) – Return type: None

Added
()¶  Adds the vector Other to <self>.
Parameters: Other (Handle_Geom2d_Vector &) – Return type: Handle_Geom2d_VectorWithMagnitude

Divided
()¶  Divides <self> by a scalar. A new vector is returned.
Parameters: Scalar (float) – Return type: Handle_Geom2d_VectorWithMagnitude

GetHandle
()¶

Multiplied
()¶  Computes the product of the vector <self> by a scalar. A new vector is returned. //! C++: alias operator * Collision with same operator defined for the class Vector!
Parameters: Scalar (float) – Return type: Handle_Geom2d_VectorWithMagnitude

Multiply
()¶  Computes the product of the vector <self> by a scalar.
Parameters: Scalar (float) – Return type: None

Normalize
()¶  Normalizes <self>. //! Raised if the magnitude of the vector is lower or equal to Resolution from package gp.
Return type: None

Normalized
()¶  Returns a copy of <self> Normalized. //! Raised if the magnitude of the vector is lower or equal to Resolution from package gp.
Return type: Handle_Geom2d_VectorWithMagnitude

Subtract
()¶  Subtracts the Vector Other to <self>.
Parameters: Other (Handle_Geom2d_Vector &) – Return type: None

Subtracted
()¶  Subtracts the vector Other to <self>. A new vector is returned.
Parameters: Other (Handle_Geom2d_Vector &) – Return type: Handle_Geom2d_VectorWithMagnitude

thisown
¶ The membership flag

class
Handle_Geom2d_AxisPlacement
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Geometry

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_BSplineCurve
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_BoundedCurve

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_BezierCurve
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_BoundedCurve

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_BoundedCurve
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Curve

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_CartesianPoint
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Point

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_Circle
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Conic

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_Conic
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Curve

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_Curve
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Geometry

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_Direction
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Vector

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_Ellipse
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Conic

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_Geometry
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_Hyperbola
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Conic

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_Line
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Curve

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_OffsetCurve
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Curve

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_Parabola
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Conic

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_Point
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Geometry

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_Transformation
(*args)¶ Bases:
OCC.MMgt.Handle_MMgt_TShared

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_TrimmedCurve
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_BoundedCurve

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_Vector
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Geometry

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

class
Handle_Geom2d_VectorWithMagnitude
(*args)¶ Bases:
OCC.Geom2d.Handle_Geom2d_Vector

static
DownCast
()¶

GetObject
()¶

IsNull
()¶

Nullify
()¶

thisown
¶ The membership flag

static

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

advance
()¶

copy
()¶

decr
()¶

distance
()¶

equal
()¶

incr
()¶

next
()¶

previous
()¶

thisown
¶ The membership flag

value
()¶


register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases