OCC.Convert module

class OCC.Convert.Convert_CircleToBSplineCurve(*args)

Bases: OCC.Convert.Convert_ConicToBSplineCurve

thisown

The membership flag

class OCC.Convert.Convert_CompBezierCurves2dToBSplineCurve2d(AngularTolerance=0.0001)

Bases: object

AddCurve()
  • Adds the Bezier curve defined by the table of poles Poles, to the sequence (still contained in this framework) of adjacent Bezier curves to be converted into a BSpline curve. Only polynomial (i.e. non-rational) Bezier curves are converted using this framework. If this is not the first call to the function (i.e. if this framework still contains data in its sequence of Bezier curves), the degree of continuity of the BSpline curve will be increased at the time of computation at the first point of the added Bezier curve (i.e. the first point of the Poles table). This will be the case if the tangent vector of the curve at this point is parallel to the tangent vector at the end point of the preceding Bezier curve in the sequence of Bezier curves still contained in this framework. An angular tolerance given at the time of construction of this framework, will be used to check the parallelism of the two tangent vectors. This checking procedure, and all the relative computations will be performed by the function Perform. When the sequence of adjacent Bezier curves is complete, use the following functions: - Perform to compute the data needed to build the BSpline curve, - and the available consultation functions to access the computed data. This data may be used to construct the BSpline curve. Warning The sequence of Bezier curves treated by this framework is automatically initialized with the first Bezier curve when the function is first called. During subsequent use of this function, ensure that the first point of the added Bezier curve (i.e. the first point of the Poles table) is coincident with the last point of the sequence (i.e. the last point of the preceding Bezier curve in the sequence) of Bezier curves still contained in this framework. An error may occur at the time of computation if this condition is not satisfied. Particular care must be taken with respect to the above, as this condition is not checked either when defining the sequence of Bezier curves or at the time of computation.
Parameters:Poles (TColgp_Array1OfPnt2d) –
Return type:None
Degree()
  • Returns the degree of the BSpline curve whose data is computed in this framework. Warning Take particular care not to use this function before the computation is performed (Perform function), as this condition is not checked and an error may therefore occur.
Return type:int
KnotsAndMults()
  • Loads the Knots table with the knots and the Mults table with the corresponding multiplicities of the BSpline curve whose data is computed in this framework. Warning - Do not use this function before the computation is performed (Perform function). - The length of the Knots and Mults arrays must be equal to the number of knots in the BSpline curve whose data is computed in this framework. Particular care must be taken with respect to the above as these conditions are not checked, and an error may occur.
Parameters:
  • Knots (TColStd_Array1OfReal &) –
  • Mults (TColStd_Array1OfInteger &) –
Return type:

None

NbKnots()
  • Returns the number of knots of the BSpline curve whose data is computed in this framework. Warning Take particular care not to use this function before the computation is performed (Perform function), as this condition is not checked and an error may therefore occur.
Return type:int
NbPoles()
  • Returns the number of poles of the BSpline curve whose data is computed in this framework. Warning Take particular care not to use this function before the computation is performed (Perform function), as this condition is not checked and an error may therefore occur.
Return type:int
Perform()
  • Computes all the data needed to build a BSpline curve equivalent to the sequence of adjacent Bezier curves still contained in this framework. A knot is inserted on the computed BSpline curve at the junction point of two consecutive Bezier curves. The degree of continuity of the BSpline curve will be increased at the junction point of two consecutive Bezier curves if their tangent vectors at this point are parallel. An angular tolerance given at the time of construction of this framework is used to check the parallelism of the two tangent vectors. Use the available consultation functions to access the computed data. This data may then be used to construct the BSpline curve. Warning Ensure that the curves in the sequence of Bezier curves contained in this framework are adjacent. An error may occur at the time of computation if this condition is not satisfied. Particular care must be taken with respect to the above as this condition is not checked, either when defining the Bezier curve sequence or at the time of computation.
Return type:None
Poles()
  • Loads the Poles table with the poles of the BSpline curve whose data is computed in this framework. Warning - Do not use this function before the computation is performed (Perform function). - The length of the Poles array must be equal to the number of poles of the BSpline curve whose data is computed in this framework. Particular care must be taken with respect to the above, as these conditions are not checked, and an error may occur.
Parameters:Poles (TColgp_Array1OfPnt2d) –
Return type:None
thisown

The membership flag

class OCC.Convert.Convert_CompBezierCurvesToBSplineCurve(AngularTolerance=0.0001)

Bases: object

AddCurve()
  • Adds the Bezier curve defined by the table of poles Poles, to the sequence (still contained in this framework) of adjacent Bezier curves to be converted into a BSpline curve. Only polynomial (i.e. non-rational) Bezier curves are converted using this framework. If this is not the first call to the function (i.e. if this framework still contains data in its Bezier curve sequence), the degree of continuity of the BSpline curve will be increased at the time of computation at the first point of the added Bezier curve (i.e. the first point of the Poles table). This will be the case if the tangent vector of the curve at this point is parallel to the tangent vector at the end point of the preceding Bezier curve in the Bezier curve sequence still contained in this framework. An angular tolerance given at the time of construction of this framework will be used to check the parallelism of the two tangent vectors. This checking procedure and all related computations will be performed by the Perform function. When the adjacent Bezier curve sequence is complete, use the following functions: - Perform to compute the data needed to build the BSpline curve, - and the available consultation functions to access the computed data. This data may be used to construct the BSpline curve. Warning The Bezier curve sequence treated by this framework is automatically initialized with the first Bezier curve when the function is first called. During subsequent use of this function, ensure that the first point of the added Bezier curve (i.e. the first point of the Poles table) is coincident with the last point of the Bezier curve sequence (i.e. the last point of the preceding Bezier curve in the sequence) still contained in this framework. An error may occur at the time of computation if this condition is not satisfied. Particular care must be taken with respect to the above, as this condition is not checked either when defining the Bezier curve sequence or at the time of computation.
Parameters:Poles (TColgp_Array1OfPnt) –
Return type:None
Degree()
  • Returns the degree of the BSpline curve whose data is computed in this framework. Warning Take particular care not to use this function before the computation is performed (Perform function), as this condition is not checked and an error may therefore occur.
Return type:int
KnotsAndMults()
    • loads the Knots table with the knots, - and loads the Mults table with the corresponding multiplicities of the BSpline curve whose data is computed in this framework. Warning - Do not use this function before the computation is performed (Perform function). - The length of the Knots and Mults arrays must be equal to the number of knots in the BSpline curve whose data is computed in this framework. Particular care must be taken with respect to the above as these conditions are not checked, and an error may occur.
Parameters:
  • Knots (TColStd_Array1OfReal &) –
  • Mults (TColStd_Array1OfInteger &) –
Return type:

None

NbKnots()
  • Returns the number of knots of the BSpline curve whose data is computed in this framework. Warning Take particular care not to use this function before the computation is performed (Perform function), as this condition is not checked and an error may therefore occur.
Return type:int
NbPoles()
  • Returns the number of poles of the BSpline curve whose data is computed in this framework. Warning Take particular care not to use this function before the computation is performed (Perform function), as this condition is not checked and an error may therefore occur.
Return type:int
Perform()
  • Computes all the data needed to build a BSpline curve equivalent to the adjacent Bezier curve sequence still contained in this framework. A knot is inserted on the computed BSpline curve at the junction point of two consecutive Bezier curves. The degree of continuity of the BSpline curve will be increased at the junction point of two consecutive Bezier curves if their tangent vectors at this point are parallel. An angular tolerance given at the time of construction of this framework is used to check the parallelism of the two tangent vectors. Use the available consultation functions to access the computed data. This data may then be used to construct the BSpline curve. Warning Make sure that the curves in the Bezier curve sequence contained in this framework are adjacent. An error may occur at the time of computation if this condition is not satisfied. Particular care must be taken with respect to the above as this condition is not checked, either when defining the Bezier curve sequence or at the time of computation.
Return type:None
Poles()
  • Loads the Poles table with the poles of the BSpline curve whose data is computed in this framework. Warning - Do not use this function before the computation is performed (Perform function). - The length of the Poles array must be equal to the number of poles of the BSpline curve whose data is computed in this framework. Particular care must be taken with respect to the above, as these conditions are not checked, and an error may occur.
Parameters:Poles (TColgp_Array1OfPnt) –
Return type:None
thisown

The membership flag

class OCC.Convert.Convert_CompPolynomialToPoles(*args)

Bases: object

Degree()
Return type:int
IsDone()
Return type:bool
Knots()
  • Knots of the n-dimensional Bspline
Parameters:K (Handle_TColStd_HArray1OfReal &) –
Return type:None
Multiplicities()
  • Multiplicities of the knots in the BSpline
Parameters:M (Handle_TColStd_HArray1OfInteger &) –
Return type:None
NbKnots()
  • Degree of the n-dimensional Bspline
Return type:int
NbPoles()
  • number of poles of the n-dimensional BSpline
Return type:int
Poles()
  • returns the poles of the n-dimensional BSpline in the following format : [1..NumPoles][1..Dimension]
Parameters:Poles (Handle_TColStd_HArray2OfReal &) –
Return type:None
thisown

The membership flag

class OCC.Convert.Convert_ConeToBSplineSurface(*args)

Bases: OCC.Convert.Convert_ElementarySurfaceToBSplineSurface

thisown

The membership flag

class OCC.Convert.Convert_ConicToBSplineCurve(*args, **kwargs)

Bases: object

BuildCosAndSin()
Parameters:
  • Parametrisation (Convert_ParameterisationType) –
  • CosNumerator (Handle_TColStd_HArray1OfReal &) –
  • SinNumerator (Handle_TColStd_HArray1OfReal &) –
  • Denominator (Handle_TColStd_HArray1OfReal &) –
  • Degree (Standard_Integer &) –
  • Knots (Handle_TColStd_HArray1OfReal &) –
  • Mults (Handle_TColStd_HArray1OfInteger &) –
  • Parametrisation
  • UFirst (float) –
  • ULast (float) –
  • CosNumerator
  • SinNumerator
  • Denominator
  • Degree
  • Knots
  • Mults
Return type:

None

Return type:

None

Degree()
  • Returns the degree of the BSpline curve whose data is computed in this framework.
Return type:int
IsPeriodic()
  • Returns true if the BSpline curve whose data is computed in this framework is periodic.
Return type:bool
Knot()
  • Returns the knot of index Index to the knots table of the BSpline curve whose data is computed in this framework. Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table of the BSpline curve whose data is computed in this framework.
Parameters:Index (Standard_Integer) –
Return type:float
Multiplicity()
  • Returns the multiplicity of the knot of index Index to the knots table of the BSpline curve whose data is computed in this framework. Exceptions Standard_OutOfRange if Index is outside the bounds of the knots table of the BSpline curve whose data is computed in this framework.
Parameters:Index (Standard_Integer) –
Return type:int
NbKnots()
  • Returns the number of knots of the BSpline curve whose data is computed in this framework.
Return type:int
NbPoles()
  • Returns the number of poles of the BSpline curve whose data is computed in this framework.
Return type:int
Pole()
  • Returns the pole of index Index to the poles table of the BSpline curve whose data is computed in this framework. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table of the BSpline curve whose data is computed in this framework.
Parameters:Index (Standard_Integer) –
Return type:gp_Pnt2d
Weight()
  • Returns the weight of the pole of index Index to the poles table of the BSpline curve whose data is computed in this framework. Exceptions Standard_OutOfRange if Index is outside the bounds of the poles table of the BSpline curve whose data is computed in this framework.
Parameters:Index (Standard_Integer) –
Return type:float
thisown

The membership flag

class OCC.Convert.Convert_CylinderToBSplineSurface(*args)

Bases: OCC.Convert.Convert_ElementarySurfaceToBSplineSurface

thisown

The membership flag

class OCC.Convert.Convert_ElementarySurfaceToBSplineSurface(*args, **kwargs)

Bases: object

IsUPeriodic()
Return type:bool
IsVPeriodic()
  • Returns true if the BSpline surface whose data is computed in this framework is periodic in the u or v parametric direction.
Return type:bool
NbUKnots()
Return type:int
NbUPoles()
Return type:int
NbVKnots()
  • Returns the number of knots for the u or v parametric direction of the BSpline surface whose data is computed in this framework .
Return type:int
NbVPoles()
  • Returns the number of poles for the u or v parametric direction of the BSpline surface whose data is computed in this framework.
Return type:int
Pole()
  • Returns the pole of index (UIndex,VIndex) to the poles table of the BSpline surface whose data is computed in this framework. Exceptions Standard_OutOfRange if, for the BSpline surface whose data is computed in this framework: - UIndex is outside the bounds of the poles table in the u parametric direction, or - VIndex is outside the bounds of the poles table in the v parametric direction.
Parameters:
  • UIndex (Standard_Integer) –
  • VIndex (Standard_Integer) –
Return type:

gp_Pnt

UDegree()
Return type:int
UKnot()
  • Returns the U-knot of range UIndex. Raised if UIndex < 1 or UIndex > NbUKnots.
Parameters:UIndex (Standard_Integer) –
Return type:float
UMultiplicity()
  • Returns the multiplicity of the U-knot of range UIndex. Raised if UIndex < 1 or UIndex > NbUKnots.
Parameters:UIndex (Standard_Integer) –
Return type:int
VDegree()
  • Returns the degree for the u or v parametric direction of the BSpline surface whose data is computed in this framework.
Return type:int
VKnot()
  • Returns the V-knot of range VIndex. Raised if VIndex < 1 or VIndex > NbVKnots.
Parameters:UIndex (Standard_Integer) –
Return type:float
VMultiplicity()
  • Returns the multiplicity of the V-knot of range VIndex. Raised if VIndex < 1 or VIndex > NbVKnots.
Parameters:VIndex (Standard_Integer) –
Return type:int
Weight()
  • Returns the weight of the pole of index (UIndex,VIndex) to the poles table of the BSpline surface whose data is computed in this framework. Exceptions Standard_OutOfRange if, for the BSpline surface whose data is computed in this framework: - UIndex is outside the bounds of the poles table in the u parametric direction, or - VIndex is outside the bounds of the poles table in the v parametric direction.
Parameters:
  • UIndex (Standard_Integer) –
  • VIndex (Standard_Integer) –
Return type:

float

thisown

The membership flag

class OCC.Convert.Convert_EllipseToBSplineCurve(*args)

Bases: OCC.Convert.Convert_ConicToBSplineCurve

thisown

The membership flag

class OCC.Convert.Convert_GridPolynomialToPoles(*args)

Bases: object

IsDone()
Return type:bool
NbUKnots()
Return type:int
NbUPoles()
Return type:int
NbVKnots()
Return type:int
NbVPoles()
Return type:int
Perform()
Parameters:
  • UContinuity (Standard_Integer) –
  • VContinuity (Standard_Integer) –
  • MaxUDegree (Standard_Integer) –
  • MaxVDegree (Standard_Integer) –
  • NumCoeffPerSurface (Handle_TColStd_HArray2OfInteger &) –
  • Coefficients (Handle_TColStd_HArray1OfReal &) –
  • PolynomialUIntervals (Handle_TColStd_HArray1OfReal &) –
  • PolynomialVIntervals (Handle_TColStd_HArray1OfReal &) –
  • TrueUIntervals (Handle_TColStd_HArray1OfReal &) –
  • TrueVIntervals (Handle_TColStd_HArray1OfReal &) –
Return type:

None

Poles()
  • returns the poles of the BSpline Surface
Return type:Handle_TColgp_HArray2OfPnt
UDegree()
Return type:int
UKnots()
  • Knots in the U direction
Return type:Handle_TColStd_HArray1OfReal
UMultiplicities()
  • Multiplicities of the knots in the U direction
Return type:Handle_TColStd_HArray1OfInteger
VDegree()
Return type:int
VKnots()
  • Knots in the V direction
Return type:Handle_TColStd_HArray1OfReal
VMultiplicities()
  • Multiplicities of the knots in the V direction
Return type:Handle_TColStd_HArray1OfInteger
thisown

The membership flag

class OCC.Convert.Convert_HyperbolaToBSplineCurve(*args)

Bases: OCC.Convert.Convert_ConicToBSplineCurve

thisown

The membership flag

class OCC.Convert.Convert_ParabolaToBSplineCurve(*args)

Bases: OCC.Convert.Convert_ConicToBSplineCurve

thisown

The membership flag

class OCC.Convert.Convert_SequenceNodeOfSequenceOfArray1OfPoles(*args)

Bases: OCC.TCollection.TCollection_SeqNode

GetHandle()

Convert_SequenceNodeOfSequenceOfArray1OfPoles_GetHandle(Convert_SequenceNodeOfSequenceOfArray1OfPoles self) -> Handle_Convert_SequenceNodeOfSequenceOfArray1OfPoles

Value()
Return type:Handle_TColgp_HArray1OfPnt
thisown

The membership flag

class OCC.Convert.Convert_SequenceOfArray1OfPoles

Bases: OCC.TCollection.TCollection_BaseSequence

Append()
Parameters:
  • T (Handle_TColgp_HArray1OfPnt) –
  • S (Convert_SequenceOfArray1OfPoles &) –
Return type:

None

Return type:

None

Assign()
Parameters:Other (Convert_SequenceOfArray1OfPoles &) –
Return type:Convert_SequenceOfArray1OfPoles
ChangeValue()
Parameters:Index (Standard_Integer) –
Return type:Handle_TColgp_HArray1OfPnt
Clear()
Return type:None
First()
Return type:Handle_TColgp_HArray1OfPnt
InsertAfter()
Parameters:
  • Index (Standard_Integer) –
  • T (Handle_TColgp_HArray1OfPnt) –
  • Index
  • S (Convert_SequenceOfArray1OfPoles &) –
Return type:

None

Return type:

None

InsertBefore()
Parameters:
  • Index (Standard_Integer) –
  • T (Handle_TColgp_HArray1OfPnt) –
  • Index
  • S (Convert_SequenceOfArray1OfPoles &) –
Return type:

None

Return type:

None

Last()
Return type:Handle_TColgp_HArray1OfPnt
Prepend()
Parameters:
  • T (Handle_TColgp_HArray1OfPnt) –
  • S (Convert_SequenceOfArray1OfPoles &) –
Return type:

None

Return type:

None

Remove()
Parameters:
  • Index (Standard_Integer) –
  • FromIndex (Standard_Integer) –
  • ToIndex (Standard_Integer) –
Return type:

None

Return type:

None

Set()
Parameters:Other (Convert_SequenceOfArray1OfPoles &) –
Return type:Convert_SequenceOfArray1OfPoles
SetValue()
Parameters:
  • Index (Standard_Integer) –
  • I (Handle_TColgp_HArray1OfPnt) –
Return type:

None

Split()
Parameters:
  • Index (Standard_Integer) –
  • Sub (Convert_SequenceOfArray1OfPoles &) –
Return type:

None

Value()
Parameters:Index (Standard_Integer) –
Return type:Handle_TColgp_HArray1OfPnt
thisown

The membership flag

class OCC.Convert.Convert_SphereToBSplineSurface(*args)

Bases: OCC.Convert.Convert_ElementarySurfaceToBSplineSurface

thisown

The membership flag

class OCC.Convert.Convert_TorusToBSplineSurface(*args)

Bases: OCC.Convert.Convert_ElementarySurfaceToBSplineSurface

thisown

The membership flag

class OCC.Convert.Handle_Convert_SequenceNodeOfSequenceOfArray1OfPoles(*args)

Bases: OCC.TCollection.Handle_TCollection_SeqNode

static DownCast()
GetObject()
IsNull()
Nullify()
thisown

The membership flag

class OCC.Convert.SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()