OCC.GeomConvert module¶

class
GeomConvert_ApproxCurve
(*args)¶ Bases:
object
 Constructs a curve approximation framework defined by   the conic Curve,  the tolerance value Tol3d,  the degree of continuity Order,  the maximum number of segments MaxSegments allowed in the resulting BSpline curve, and  the highest degree MaxDeg which the polynomial defining the BSpline curve may have.
Parameters: Return type: 
Curve
()¶  Returns the BSpline curve resulting from the approximation algorithm.
Return type: Handle_Geom_BSplineCurve

DumpToString
()¶ GeomConvert_ApproxCurve_DumpToString(GeomConvert_ApproxCurve self) > std::string

HasResult
()¶  Returns Standard_True if the approximation did come out with a result that is not NECESSARELY within the required tolerance
Return type: bool

IsDone
()¶  returns Standard_True if the approximation has been done within requiered tolerance
Return type: bool

MaxError
()¶  Returns the greatest distance between a point on the source conic and the BSpline curve resulting from the approximation. (>0 when an approximation has been done, 0 if no approximation)
Return type: float

thisown
¶ The membership flag

class
GeomConvert_ApproxSurface
(*args)¶ Bases:
object
 Constructs a surface approximation framework defined by  the conic Surf  the tolerance value Tol3d  the degree of continuity UContinuity, VContinuity in the directions of the U and V parameters  the highest degree MaxDegU, MaxDegV which the polynomial defining the BSpline curve may have in the directions of the U and V parameters  the maximum number of segments MaxSegments allowed in the resulting BSpline curve  the index of precision PrecisCode.
Parameters: Return type: 
DumpToString
()¶ GeomConvert_ApproxSurface_DumpToString(GeomConvert_ApproxSurface self) > std::string

HasResult
()¶  Returns true if the approximation did come out with a result that is not NECESSARILY within the required tolerance or a result that is not recognized with the wished continuities.
Return type: bool

MaxError
()¶  Returns the greatest distance between a point on the source conic surface and the BSpline surface resulting from the approximation (>0 when an approximation has been done, 0 if no approximation )
Return type: float

Surface
()¶  Returns the BSpline surface resulting from the approximation algorithm.
Return type: Handle_Geom_BSplineSurface

thisown
¶ The membership flag

class
GeomConvert_BSplineCurveKnotSplitting
(*args)¶ Bases:
object
 Determines points at which the BSpline curve BasisCurve should be split in order to obtain arcs with a degree of continuity equal to ContinuityRange. These points are knot values of BasisCurve. They are identified by indices in the knots table of BasisCurve. Use the available interrogation functions to access computed values, followed by the global function SplitBSplineCurve (provided by the package GeomConvert) to split the curve. Exceptions Standard_RangeError if ContinuityRange is less than zero.
Parameters:  BasisCurve (Handle_Geom_BSplineCurve &) –
 ContinuityRange (int) –
Return type: 
NbSplits
()¶  Returns the number of points at which the analyzed BSpline curve should be split, in order to obtain arcs with the continuity required by this framework. All these points correspond to knot values. Note that the first and last points of the curve, which bound the first and last arcs, are counted among these splitting points.
Return type: int

SplitValue
()¶  Returns the split knot of index Index to the split knots table computed in this framework. The returned value is an index in the knots table of the BSpline curve analyzed by this algorithm. Notes:  If Index is equal to 1, the corresponding knot gives the first point of the curve.  If Index is equal to the number of split knots computed in this framework, the corresponding point is the last point of the curve. Exceptions Standard_RangeError if Index is less than 1 or greater than the number of split knots computed in this framework.
Parameters: Index (int) – Return type: int

Splitting
()¶  Loads the SplitValues table with the split knots values computed in this framework. Each value in the table is an index in the knots table of the BSpline curve analyzed by this algorithm. The values in SplitValues are given in ascending order and comprise the indices of the knots which give the first and last points of the curve. Use two consecutive values from the table as arguments of the global function SplitBSplineCurve (provided by the package GeomConvert) to split the curve. Exceptions Standard_DimensionError if the array SplitValues was not created with the following bounds:  1, and  the number of split points computed in this framework (as given by the function NbSplits).
Parameters: SplitValues (TColStd_Array1OfInteger &) – Return type: None

thisown
¶ The membership flag

class
GeomConvert_BSplineCurveToBezierCurve
(*args)¶ Bases:
object
 Computes all the data needed to convert the BSpline curve BasisCurve into a series of adjacent Bezier arcs.
Parameters: BasisCurve (Handle_Geom_BSplineCurve &) – Return type: None  Computes all the data needed to convert the portion of the BSpline curve BasisCurve limited by the two parameter values U1 and U2 into a series of adjacent Bezier arcs. The result consists of a series of BasisCurve arcs limited by points corresponding to knot values of the curve. Use the available interrogation functions to ascertain the number of computed Bezier arcs, and then to construct each individual Bezier curve (or all Bezier curves). Note: ParametricTolerance is not used. Raises DomainError if U1 or U2 are out of the parametric bounds of the basis curve [FirstParameter, LastParameter]. The Tolerance criterion is ParametricTolerance. Raised if Abs (U2  U1) <= ParametricTolerance.
Parameters: Return type: 
Arc
()¶  Constructs and returns the Bezier curve of index Index to the table of adjacent Bezier arcs computed by this algorithm. This Bezier curve has the same orientation as the BSpline curve analyzed in this framework. Exceptions Standard_OutOfRange if Index is less than 1 or greater than the number of adjacent Bezier arcs computed by this algorithm.
Parameters: Index (int) – Return type: Handle_Geom_BezierCurve

Arcs
()¶  Constructs all the Bezier curves whose data is computed by this algorithm and loads these curves into the Curves table. The Bezier curves have the same orientation as the BSpline curve analyzed in this framework. Exceptions Standard_DimensionError if the Curves array was not created with the following bounds:  1 , and  the number of adjacent Bezier arcs computed by this algorithm (as given by the function NbArcs).
Parameters: Curves (TColGeom_Array1OfBezierCurve &) – Return type: None

Knots
()¶  This methode returns the bspline’s knots associated to the converted arcs Raised if the length of Curves is not equal to NbArcs + 1.
Parameters: TKnots (TColStd_Array1OfReal &) – Return type: None

NbArcs
()¶  Returns the number of BezierCurve arcs. If at the creation time you have decomposed the basis curve between the parametric values UFirst, ULast the number of BezierCurve arcs depends on the number of knots included inside the interval [UFirst, ULast]. If you have decomposed the whole basis Bspline curve the number of BezierCurve arcs NbArcs is equal to the number of knots less one.
Return type: int

thisown
¶ The membership flag

class
GeomConvert_BSplineSurfaceKnotSplitting
(*args)¶ Bases:
object
 Determines the u and visoparametric curves along which the BSpline surface BasisSurface should be split in order to obtain patches with a degree of continuity equal to UContinuityRange in the u parametric direction, and to VContinuityRange in the v parametric direction. These isoparametric curves are defined by parameters, which are BasisSurface knot values in the u or v parametric direction. They are identified by indices in the BasisSurface knots table in the corresponding parametric direction. Use the available interrogation functions to access computed values, followed by the global function SplitBSplineSurface (provided by the package GeomConvert) to split the surface. Exceptions Standard_RangeError if UContinuityRange or VContinuityRange is less than zero.
Parameters: Return type: 
NbUSplits
()¶  Returns the number of uisoparametric curves along which the analysed BSpline surface should be split in order to obtain patches with the continuity required by this framework. The parameters which define these curves are knot values in the corresponding parametric direction. Note that the four curves which bound the surface are counted among these splitting curves.
Return type: int

NbVSplits
()¶  Returns the number of visoparametric curves along which the analysed BSpline surface should be split in order to obtain patches with the continuity required by this framework. The parameters which define these curves are knot values in the corresponding parametric direction. Note that the four curves which bound the surface are counted among these splitting curves.
Return type: int

Splitting
()¶  Loads the USplit and VSplit tables with the split knots values computed in this framework. Each value in these tables is an index in the knots table corresponding to the u or v parametric direction of the BSpline surface analysed by this algorithm. The USplit and VSplit values are given in ascending order and comprise the indices of the knots which give the first and last isoparametric curves of the surface in the corresponding parametric direction. Use two consecutive values from the USplit table and two consecutive values from the VSplit table as arguments of the global function SplitBSplineSurface (provided by the package GeomConvert) to split the surface. Exceptions Standard_DimensionError if:  the array USplit was not created with the following bounds:  1 , and  the number of split knots in the u parametric direction computed in this framework (as given by the function NbUSplits); or  the array VSplit was not created with the following bounds:  1 , and  the number of split knots in the v parametric direction computed in this framework (as given by the function NbVSplits).
Parameters:  USplit (TColStd_Array1OfInteger &) –
 VSplit (TColStd_Array1OfInteger &) –
Return type:

USplitValue
()¶  Returns the split knot of index UIndex to the split knots table for the u parametric direction computed in this framework. The returned value is an index in the knots table relative to the u parametric direction of the BSpline surface analysed by this algorithm. Note: If UIndex is equal to 1, or to the number of split knots for the u parametric direction computed in this framework, the corresponding knot gives the parameter of one of the bounding curves of the surface. Exceptions Standard_RangeError if UIndex is less than 1 or greater than the number of split knots for the u parametric direction computed in this framework.
Parameters: UIndex (int) – Return type: int

VSplitValue
()¶  Returns the split knot of index VIndex to the split knots table for the v parametric direction computed in this framework. The returned value is an index in the knots table relative to the v parametric direction of the BSpline surface analysed by this algorithm. Note: If UIndex is equal to 1, or to the number of split knots for the v parametric direction computed in this framework, the corresponding knot gives the parameter of one of the bounding curves of the surface. Exceptions Standard_RangeError if VIndex is less than 1 or greater than the number of split knots for the v parametric direction computed in this framework.
Parameters: VIndex (int) – Return type: int

thisown
¶ The membership flag

class
GeomConvert_BSplineSurfaceToBezierSurface
(*args)¶ Bases:
object
 Computes all the data needed to convert  the BSpline surface BasisSurface into a series of adjacent Bezier surfaces. The result consists of a grid of BasisSurface patches limited by isoparametric curves corresponding to knot values, both in the u and v parametric directions of the surface. A row in the grid corresponds to a series of adjacent patches, all limited by the same two uisoparametric curves. A column in the grid corresponds to a series of adjacent patches, all limited by the same two visoparametric curves. Use the available interrogation functions to ascertain the number of computed Bezier patches, and then to construct each individual Bezier surface (or all Bezier surfaces). Note: ParametricTolerance is not used.
Parameters: BasisSurface (Handle_Geom_BSplineSurface &) – Return type: None  Computes all the data needed to convert the patch of the BSpline surface BasisSurface limited by the two parameter values U1 and U2 in the u parametric direction, and by the two parameter values V1 and V2 in the v parametric direction, into a series of adjacent Bezier surfaces. The result consists of a grid of BasisSurface patches limited by isoparametric curves corresponding to knot values, both in the u and v parametric directions of the surface. A row in the grid corresponds to a series of adjacent patches, all limited by the same two uisoparametric curves. A column in the grid corresponds to a series of adjacent patches, all limited by the same two visoparametric curves. Use the available interrogation functions to ascertain the number of computed Bezier patches, and then to construct each individual Bezier surface (or all Bezier surfaces). Note: ParametricTolerance is not used. Raises DomainError if U1 or U2 or V1 or V2 are out of the parametric bounds of the basis surface [FirstUKnotIndex, LastUKnotIndex] , [FirstVKnotIndex, LastVKnotIndex] The tolerance criterion is ParametricTolerance. Raised if U2  U1 <= ParametricTolerance or V2  V1 <= ParametricTolerance.
Parameters: Return type: 
NbUPatches
()¶  Returns the number of Bezier surfaces in the U direction. If at the creation time you have decomposed the basis Surface between the parametric values UFirst, ULast the number of Bezier surfaces in the U direction depends on the number of knots included inside the interval [UFirst, ULast]. If you have decomposed the whole basis Bspline surface the number of Bezier surfaces NbUPatches is equal to the number of UKnots less one.
Return type: int

NbVPatches
()¶  Returns the number of Bezier surfaces in the V direction. If at the creation time you have decomposed the basis surface between the parametric values VFirst, VLast the number of Bezier surfaces in the V direction depends on the number of knots included inside the interval [VFirst, VLast]. If you have decomposed the whole basis Bspline surface the number of Bezier surfaces NbVPatches is equal to the number of VKnots less one.
Return type: int

Patch
()¶  Constructs and returns the Bezier surface of indices (UIndex, VIndex) to the patch grid computed on the BSpline surface analyzed by this algorithm. This Bezier surface has the same orientation as the BSpline surface analyzed in this framework. UIndex is an index common to a row in the patch grid. A row in the grid corresponds to a series of adjacent patches, all limited by the same two uisoparametric curves of the surface. VIndex is an index common to a column in the patch grid. A column in the grid corresponds to a series of adjacent patches, all limited by the same two visoparametric curves of the surface. Exceptions Standard_OutOfRange if:  UIndex is less than 1 or greater than the number of rows in the patch grid computed on the BSpline surface analyzed by this algorithm (as returned by the function NbUPatches); or if  VIndex is less than 1 or greater than the number of columns in the patch grid computed on the BSpline surface analyzed by this algorithm (as returned by the function NbVPatches).
Parameters: Return type:

Patches
()¶  Constructs all the Bezier surfaces whose data is computed by this algorithm, and loads them into the Surfaces table. These Bezier surfaces have the same orientation as the BSpline surface analyzed in this framework. The Surfaces array is organised in the same way as the patch grid computed on the BSpline surface analyzed by this algorithm. A row in the array corresponds to a series of adjacent patches, all limited by the same two uisoparametric curves of the surface. A column in the array corresponds to a series of adjacent patches, all limited by the same two visoparametric curves of the surface. Exceptions Standard_DimensionError if the Surfaces array was not created with the following bounds:  1, and the number of adjacent patch series in the u parametric direction of the patch grid computed on the BSpline surface, analyzed by this algorithm (as given by the function NbUPatches) as row bounds,  1, and the number of adjacent patch series in the v parametric direction of the patch grid computed on the BSpline surface, analyzed by this algorithm (as given by the function NbVPatches) as column bounds.
Parameters: Surfaces (TColGeom_Array2OfBezierSurface &) – Return type: None

UKnots
()¶  This methode returns the bspline’s uknots associated to the converted Patches Raised if the length of Curves is not equal to NbUPatches + 1.
Parameters: TKnots (TColStd_Array1OfReal &) – Return type: None

VKnots
()¶  This methode returns the bspline’s vknots associated to the converted Patches Raised if the length of Curves is not equal to NbVPatches + 1.
Parameters: TKnots (TColStd_Array1OfReal &) – Return type: None

thisown
¶ The membership flag

class
GeomConvert_CompBezierSurfacesToBSplineSurface
(*args)¶ Bases:
object
 Computes all the data needed to build a ‘C0’ continuous BSpline surface equivalent to the grid of adjacent nonrational Bezier surfaces Beziers. Each surface in the Beziers grid becomes a natural patch, limited by knots values, on the BSpline surface whose data is computed. Surfaces in the grid must satisfy the following conditions:  Coincident bounding curves between two consecutive surfaces in a row of the Beziers grid must be uisoparametric bounding curves of these two surfaces.  Coincident bounding curves between two consecutive surfaces in a column of the Beziers grid must be visoparametric bounding curves of these two surfaces. The BSpline surface whose data is computed has the following characteristics:  Its degree in the u (respectively v) parametric direction is equal to that of the Bezier surface which has the highest degree in the u (respectively v) parametric direction in the Beziers grid.  It is a ‘Piecewise Bezier’ in both u and v parametric directions, i.e.:  the knots are regularly spaced in each parametric direction (i.e. the difference between two consecutive knots is a constant), and  all the multiplicities of the surface knots in a given parametric direction are equal to Degree, which is the degree of the BSpline surface in this parametric direction, except for the first and last knots for which the multiplicity is equal to Degree + 1.  Coincident bounding curves between two consecutive columns of Bezier surfaces in the Beziers grid become uisoparametric curves, corresponding to knots values of the BSpline surface.  Coincident bounding curves between two consecutive rows of Bezier surfaces in the Beziers grid become visoparametric curves corresponding to knots values of the BSpline surface. Use the available consultation functions to access the computed data. This data may be used to construct the BSpline surface. Warning The surfaces in the Beziers grid must be adjacent, i.e. two consecutive Bezier surfaces in the grid (in a row or column) must have a coincident bounding curve. In addition, the location of the parameterization on each of these surfaces (i.e. the relative location of u and v isoparametric curves on the surface) is of importance with regard to the positioning of the surfaces in the Beziers grid. Care must be taken with respect to the above, as these properties are not checked and an error may occur if they are not satisfied. Exceptions Standard_NotImplemented if one of the Bezier surfaces of the Beziers grid is rational.
Parameters: Beziers (TColGeom_Array2OfBezierSurface &) – Return type: None  Build an Ci uniform (Rational) BSpline surface The higest Continuity Ci is imposed, like the maximal deformation is lower than <Tolerance>. Warning: The Continuity C0 is imposed without any check.
Parameters: Return type:  Computes all the data needed to construct a BSpline surface equivalent to the adjacent nonrational Bezier surfaces Beziers grid. Each surface in the Beziers grid becomes a natural patch, limited by knots values, on the BSpline surface whose data is computed. Surfaces in the grid must satisfy the following conditions:  Coincident bounding curves between two consecutive surfaces in a row of the Beziers grid must be uisoparametric bounding curves of these two surfaces.  Coincident bounding curves between two consecutive surfaces in a column of the Beziers grid must be visoparametric bounding curves of these two surfaces. The BSpline surface whose data is computed has the following characteristics:  Its degree in the u (respectively v) parametric direction is equal to that of the Bezier surface which has the highest degree in the u (respectively v) parametric direction in the Beziers grid.  Coincident bounding curves between two consecutive columns of Bezier surfaces in the Beziers grid become uisoparametric curves corresponding to knots values of the BSpline surface.  Coincident bounding curves between two consecutive rows of Bezier surfaces in the Beziers grid become visoparametric curves corresponding to knots values of the BSpline surface. Knots values of the BSpline surface are given in the two tables:  UKnots for the u parametric direction (which corresponds to the order of Bezier surface columns in the Beziers grid), and  VKnots for the v parametric direction (which corresponds to the order of Bezier surface rows in the Beziers grid). The dimensions of UKnots (respectively VKnots) must be equal to the number of columns (respectively, rows) of the Beziers grid, plus 1 . UContinuity and VContinuity, which are both defaulted to GeomAbs_C0, specify the required continuity on the BSpline surface. If the required degree of continuity is greater than 0 in a given parametric direction, a deformation is applied locally on the initial surface (as defined by the Beziers grid) to satisfy this condition. This local deformation is not applied however, if it is greater than Tolerance (defaulted to 1.0 e7). In such cases, the continuity condition is not satisfied, and the function IsDone will return false. A small tolerance value prevents any modification of the surface and a large tolerance value ‘smoothes’ the surface. Use the available consultation functions to access the computed data. This data may be used to construct the BSpline surface. Warning The surfaces in the Beziers grid must be adjacent, i.e. two consecutive Bezier surfaces in the grid (in a row or column) must have a coincident bounding curve. In addition, the location of the parameterization on each of these surfaces (i.e. the relative location of u and v isoparametric curves on the surface) is of importance with regard to the positioning of the surfaces in the Beziers grid. Care must be taken with respect to the above, as these properties are not checked and an error may occur if they are not satisfied. Exceptions Standard_DimensionMismatch:  if the number of knots in the UKnots table (i.e. the length of the UKnots array) is not equal to the number of columns of Bezier surfaces in the Beziers grid plus 1, or  if the number of knots in the VKnots table (i.e. the length of the VKnots array) is not equal to the number of rows of Bezier surfaces in the Beziers grid, plus 1. Standard_ConstructionError:  if UContinuity and VContinuity are not equal to one of the following values: GeomAbs_C0, GeomAbs_C1, GeomAbs_C2 and GeomAbs_C3; or  if the number of columns in the Beziers grid is greater than 1, and the required degree of continuity in the u parametric direction is greater than that of the Bezier surface with the highest degree in the u parametric direction (in the Beziers grid), minus 1; or  if the number of rows in the Beziers grid is greater than 1, and the required degree of continuity in the v parametric direction is greater than that of the Bezier surface with the highest degree in the v parametric direction (in the Beziers grid), minus 1 . Standard_NotImplemented if one of the Bezier surfaces in the Beziers grid is rational.
Parameters:  Beziers (TColGeom_Array2OfBezierSurface &) –
 UKnots (TColStd_Array1OfReal &) –
 VKnots (TColStd_Array1OfReal &) –
 UContinuity (GeomAbs_Shape) – default value is GeomAbs_C0
 VContinuity (GeomAbs_Shape) – default value is GeomAbs_C0
 Tolerance (float) – default value is 1.0e4
Return type: 
IsDone
()¶  Returns true if the conversion was successful. Unless an exception was raised at the time of construction, the conversion of the Bezier surface grid assigned to this algorithm is always carried out. IsDone returns false if the constraints defined at the time of construction cannot be respected. This occurs when there is an incompatibility between a required degree of continuity on the BSpline surface, and the maximum tolerance accepted for local deformations of the surface. In such a case the computed data does not satisfy all the initial constraints.
Return type: bool

NbUKnots
()¶  Returns the number of knots in the U direction of the BSpline surface whose data is computed in this framework.
Return type: int

NbUPoles
()¶  Returns number of poles in the U direction of the BSpline surface whose data is computed in this framework.
Return type: int

NbVKnots
()¶  Returns the number of knots in the V direction of the BSpline surface whose data is computed in this framework.
Return type: int

NbVPoles
()¶  Returns the number of poles in the V direction of the BSpline surface whose data is computed in this framework.
Return type: int

Poles
()¶  Returns the table of poles of the BSpline surface whose data is computed in this framework.
Return type: Handle_TColgp_HArray2OfPnt

UDegree
()¶  Returns the degree for the u parametric direction of the BSpline surface whose data is computed in this framework.
Return type: int

UKnots
()¶  Returns the knots table for the u parametric direction of the BSpline surface whose data is computed in this framework.
Return type: Handle_TColStd_HArray1OfReal

UMultiplicities
()¶  Returns the multiplicities table for the u parametric direction of the knots of the BSpline surface whose data is computed in this framework.
Return type: Handle_TColStd_HArray1OfInteger

VDegree
()¶  Returns the degree for the v parametric direction of the BSpline surface whose data is computed in this framework.
Return type: int

VKnots
()¶  Returns the knots table for the v parametric direction of the BSpline surface whose data is computed in this framework.
Return type: Handle_TColStd_HArray1OfReal

VMultiplicities
()¶  – Returns the multiplicities table for the v parametric direction of the knots of the BSpline surface whose data is computed in this framework.
Return type: Handle_TColStd_HArray1OfInteger

thisown
¶ The membership flag

class
GeomConvert_CompCurveToBSplineCurve
(*args)¶ Bases:
object
 Initialize the algorithme  Parameterisation is used to convert
Parameters: Parameterisation (Convert_ParameterisationType) – default value is Convert_TgtThetaOver2 Return type: None  Initialize the algorithme with one curve  Parameterisation is used to convert
Parameters:  BasisCurve (Handle_Geom_BoundedCurve &) –
 Parameterisation (Convert_ParameterisationType) – default value is Convert_TgtThetaOver2
Return type: 
Add
()¶  Append a curve in the BSpline Return False if the curve is not G0 with the BSplineCurve. Tolerance is used to check continuity and decrease Multiplicity at the common Knot until MinM if MinM = 0, the common Knot can be removed
Parameters: Return type:

BSplineCurve
()¶ Return type: Handle_Geom_BSplineCurve

thisown
¶ The membership flag

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

advance
()¶

copy
()¶

decr
()¶

distance
()¶

equal
()¶

incr
()¶

next
()¶

previous
()¶

thisown
¶ The membership flag

value
()¶


class
geomconvert
¶ Bases:
object

static
C0BSplineToArrayOfC1BSplineCurve
(*args)¶  This Method reduces as far as it is possible the multiplicities of the knots of the BSpline BS.(keeping the geometry). It returns an array of BSpline C1. tolerance is a geometrical tolerance.
Parameters:  BS (Handle_Geom_BSplineCurve &) –
 tabBS (Handle_TColGeom_HArray1OfBSplineCurve &) –
 tolerance (float) –
Return type: void
 This Method reduces as far as it is possible the multiplicities of the knots of the BSpline BS.(keeping the geometry). It returns an array of BSpline C1. tolerance is a geometrical tolerance : it allows for the maximum deformation The Angular tolerance is in radians and mesures the angle of the tangents on the left and on the right to decide if the curve is C1 or not at a given point
Parameters: Return type: void

static
C0BSplineToC1BSplineCurve
(*args)¶  This Method reduces as far as it is possible the multiplicities of the knots of the BSpline BS.(keeping the geometry). It returns a new BSpline which could still be C0. tolerance is a geometrical tolerance. The Angular toleranceis in radians and mesures the angle of the tangents on the left and on the right to decide if the curve is G1 or not at a given point
Parameters: Return type: void

static
ConcatC1
(*args)¶  This Method concatenates C1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N2] ClosedG1 indicates if the ArrayOfCurves is closed. In this case ClosedG1 contains the biggest tolerance of the two points which are at the closure. Otherwise its value is 0.0
Parameters: Return type: void
 This Method concatenates C1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N2] ClosedG1 indicates if the ArrayOfCurves is closed. In this case ClosedG1 contains the biggest tolerance of the two points which are at the closure. Otherwise its value is 0.0
Parameters: Return type: void

static
ConcatG1
(*args)¶  This Method concatenates G1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N2] ClosedG1 indicates if the ArrayOfCurves is closed. In this case ClosedG1 contains the biggest tolerance of the two points which are at the closure. Otherwise its value is 0.0
Parameters: Return type: void

static
CurveToBSplineCurve
(*args)¶  This function converts a non infinite curve from Geom into a Bspline curve. C must be an ellipse or a circle or a trimmed conic or a trimmed line or a Bezier curve or a trimmed Bezier curve or a BSpline curve or a trimmed BSpline curve or an OffsetCurve. The returned Bspline is not periodic except if C is a Circle or an Ellipse. If the Parameterisation is QuasiAngular than the returned curve is NOT periodic in case a periodic Geom_Circle or Geom_Ellipse. For TgtThetaOver2_1 and TgtThetaOver2_2 the method raises an exception in case of a periodic Geom_Circle or a Geom_Ellipse ParameterisationType applies only if the curve is a Circle or an ellipse : TgtThetaOver2, – TgtThetaOver2_1, – TgtThetaOver2_2, – TgtThetaOver2_3, – TgtThetaOver2_4, //! Purpose: this is the classical rational parameterisation 2 1  t cos(theta) = —— 2 1 + t //! 2t sin(theta) = —— 2 1 + t //! t = tan (theta/2) //! with TgtThetaOver2 the routine will compute the number of spans using the rule num_spans = [ (ULast  UFirst) / 1.2 ] + 1 with TgtThetaOver2_N, N spans will be forced: an error will be raized if (ULast  UFirst) >= PI and N = 1, ULast  UFirst >= 2 PI and N = 2 //! QuasiAngular, here t is a rational function that approximates theta —> tan(theta/2). Neverthless the composing with above function yields exact functions whose square sum up to 1 RationalC1 ; t is replaced by a polynomial function of u so as to grant C1 contiuity across knots. Exceptions Standard_DomainError:  if the curve C is infinite, or  if C is a (complete) circle or ellipse, and Parameterisation is equal to Convert_TgtThetaOver2_1 or Convert_TgtThetaOver2_2. Standard_ConstructionError:  if C is a (complete) circle or ellipse, and if Parameterisation is not equal to Convert_TgtThetaOver2, Convert_RationalC1, Convert_QuasiAngular (the curve is converted in these three cases) or to Convert_TgtThetaOver2_1 or Convert_TgtThetaOver2_2 (another exception is raised in these two cases).  if C is a trimmed circle or ellipse, if Parameterisation is equal to Convert_TgtThetaOver2_1 and if U2  U1 > 0.9999 * Pi, where U1 and U2 are respectively the first and the last parameters of the trimmed curve (this method of parameterization cannot be used to convert a halfcircle or a halfellipse, for example), or  if C is a trimmed circle or ellipse, if Parameterisation is equal to Convert_TgtThetaOver2_2 and U2  U1 > 1.9999 * Pi where U1 and U2 are respectively the first and the last parameters of the trimmed curve (this method of parameterization cannot be used to convert a quasicomplete circle or ellipse).
Parameters:  C (Handle_Geom_Curve &) –
 Parameterisation (Convert_ParameterisationType) – default value is Convert_TgtThetaOver2
Return type:

static
SplitBSplineCurve
(*args)¶  Convert a curve from Geom by an approximation method //! This method computes the arc of Bspline curve between the two knots FromK1 and ToK2. If C is periodic the arc has the same orientation as C if SameOrientation = Standard_True. If C is not periodic SameOrientation is not used for the computation and C is oriented from the knot fromK1 to the knot toK2. We just keep the local definition of C between the knots FromK1 and ToK2. The returned Bspline curve has its first and last knots with a multiplicity equal to degree + 1, where degree is the polynomial degree of C. The indexes of the knots FromK1 and ToK2 doesn’t include the repetition of multiple knots in their definition. Raised if FromK1 = ToK2 Raised if FromK1 or ToK2 are out of the bounds [FirstUKnotIndex, LastUKnotIndex]
Parameters: Return type:  This function computes the segment of Bspline curve between the parametric values FromU1, ToU2. If C is periodic the arc has the same orientation as C if SameOrientation = True. If C is not periodic SameOrientation is not used for the computation and C is oriented fromU1 toU2. If U1 and U2 and two parametric values we consider that U1 = U2 if Abs (U1  U2) <= ParametricTolerance and ParametricTolerance must be greater or equal to Resolution from package gp. //! Raised if FromU1 or ToU2 are out of the parametric bounds of the curve (The tolerance criterion is ParametricTolerance). Raised if Abs (FromU1  ToU2) <= ParametricTolerance Raised if ParametricTolerance < Resolution from gp.
Parameters: Return type:

static
SplitBSplineSurface
(*args)¶  Computes the Bspline surface patche between the knots values FromUK1, ToUK2, FromVK1, ToVK2. If S is periodic in one direction the patche has the same orientation as S in this direction if the flag is true in this direction (SameUOrientation, SameVOrientation). If S is not periodic SameUOrientation and SameVOrientation are not used for the computation and S is oriented FromUK1 ToUK2 and FromVK1 ToVK2. Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2 FromUK1 or ToUK2 are out of the bounds [FirstUKnotIndex, LastUKnotIndex] FromVK1 or ToVK2 are out of the bounds [FirstVKnotIndex, LastVKnotIndex]
Parameters: Return type:  This method splits a Bspline surface patche between the knots values FromK1, ToK2 in one direction. If USplit = True then the splitting direction is the U parametric direction else it is the V parametric direction. If S is periodic in the considered direction the patche has the same orientation as S in this direction if SameOrientation is True If S is not periodic in this direction SameOrientation is not used for the computation and S is oriented FromK1 ToK2. Raised if FromK1 = ToK2 or if FromK1 or ToK2 are out of the bounds [FirstUKnotIndex, LastUKnotIndex] in the considered parametric direction.
Parameters: Return type:  This method computes the Bspline surface patche between the parametric values FromU1, ToU2, FromV1, ToV2. If S is periodic in one direction the patche has the same orientation as S in this direction if the flag is True in this direction (SameUOrientation, SameVOrientation). If S is not periodic SameUOrientation and SameVOrientation are not used for the computation and S is oriented FromU1 ToU2 and FromV1 ToV2. If U1 and U2 and two parametric values we consider that U1 = U2 if Abs (U1  U2) <= ParametricTolerance and ParametricTolerance must be greater or equal to Resolution from package gp. //! Raised if FromU1 or ToU2 or FromV1 or ToU2 are out of the parametric bounds of the surface (the tolerance criterion is ParametricTolerance). Raised if Abs (FromU1  ToU2) <= ParametricTolerance or Abs (FromV1  ToV2) <= ParametricTolerance. Raised if ParametricTolerance < Resolution.
Parameters: Return type:  This method splits the Bspline surface S in one direction between the parametric values FromParam1, ToParam2. If USplit = True then the Splitting direction is the U parametric direction else it is the V parametric direction. If S is periodic in the considered direction the patche has the same orientation as S in this direction if SameOrientation is true. If S is not periodic in the considered direction SameOrientation is not used for the computation and S is oriented FromParam1 ToParam2. If U1 and U2 and two parametric values we consider that U1 = U2 if Abs (U1  U2) <= ParametricTolerance and ParametricTolerance must be greater or equal to Resolution from package gp. //! Raises if FromParam1 or ToParam2 are out of the parametric bounds of the surface in the considered direction. Raises if Abs (FromParam1  ToParam2) <= ParametricTolerance.
Parameters: Return type:

static
SurfaceToBSplineSurface
(*args)¶  This algorithm converts a non infinite surface from Geom into a Bspline surface. S must be a trimmed plane or a trimmed cylinder or a trimmed cone or a trimmed sphere or a trimmed torus or a sphere or a torus or a Bezier surface of a trimmed Bezier surface or a trimmed swept surface with a corresponding basis curve which can be turned into a Bspline curve (see the method CurveToBSplineCurve). Raises DomainError if the type of the surface is not previously defined.
Parameters: S (Handle_Geom_Surface &) – Return type: Handle_Geom_BSplineSurface

thisown
¶ The membership flag

static

geomconvert_C0BSplineToArrayOfC1BSplineCurve
(*args)¶  This Method reduces as far as it is possible the multiplicities of the knots of the BSpline BS.(keeping the geometry). It returns an array of BSpline C1. tolerance is a geometrical tolerance.
Parameters:  BS (Handle_Geom_BSplineCurve &) –
 tabBS (Handle_TColGeom_HArray1OfBSplineCurve &) –
 tolerance (float) –
Return type: void
 This Method reduces as far as it is possible the multiplicities of the knots of the BSpline BS.(keeping the geometry). It returns an array of BSpline C1. tolerance is a geometrical tolerance : it allows for the maximum deformation The Angular tolerance is in radians and mesures the angle of the tangents on the left and on the right to decide if the curve is C1 or not at a given point
Parameters: Return type: void

geomconvert_C0BSplineToC1BSplineCurve
(*args)¶  This Method reduces as far as it is possible the multiplicities of the knots of the BSpline BS.(keeping the geometry). It returns a new BSpline which could still be C0. tolerance is a geometrical tolerance. The Angular toleranceis in radians and mesures the angle of the tangents on the left and on the right to decide if the curve is G1 or not at a given point
Parameters: Return type: void

geomconvert_ConcatC1
(*args)¶  This Method concatenates C1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N2] ClosedG1 indicates if the ArrayOfCurves is closed. In this case ClosedG1 contains the biggest tolerance of the two points which are at the closure. Otherwise its value is 0.0
Parameters: Return type: void
 This Method concatenates C1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N2] ClosedG1 indicates if the ArrayOfCurves is closed. In this case ClosedG1 contains the biggest tolerance of the two points which are at the closure. Otherwise its value is 0.0
Parameters: Return type: void

geomconvert_ConcatG1
(*args)¶  This Method concatenates G1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N2] ClosedG1 indicates if the ArrayOfCurves is closed. In this case ClosedG1 contains the biggest tolerance of the two points which are at the closure. Otherwise its value is 0.0
Parameters: Return type: void

geomconvert_CurveToBSplineCurve
(*args)¶  This function converts a non infinite curve from Geom into a Bspline curve. C must be an ellipse or a circle or a trimmed conic or a trimmed line or a Bezier curve or a trimmed Bezier curve or a BSpline curve or a trimmed BSpline curve or an OffsetCurve. The returned Bspline is not periodic except if C is a Circle or an Ellipse. If the Parameterisation is QuasiAngular than the returned curve is NOT periodic in case a periodic Geom_Circle or Geom_Ellipse. For TgtThetaOver2_1 and TgtThetaOver2_2 the method raises an exception in case of a periodic Geom_Circle or a Geom_Ellipse ParameterisationType applies only if the curve is a Circle or an ellipse : TgtThetaOver2, – TgtThetaOver2_1, – TgtThetaOver2_2, – TgtThetaOver2_3, – TgtThetaOver2_4, //! Purpose: this is the classical rational parameterisation 2 1  t cos(theta) = —— 2 1 + t //! 2t sin(theta) = —— 2 1 + t //! t = tan (theta/2) //! with TgtThetaOver2 the routine will compute the number of spans using the rule num_spans = [ (ULast  UFirst) / 1.2 ] + 1 with TgtThetaOver2_N, N spans will be forced: an error will be raized if (ULast  UFirst) >= PI and N = 1, ULast  UFirst >= 2 PI and N = 2 //! QuasiAngular, here t is a rational function that approximates theta —> tan(theta/2). Neverthless the composing with above function yields exact functions whose square sum up to 1 RationalC1 ; t is replaced by a polynomial function of u so as to grant C1 contiuity across knots. Exceptions Standard_DomainError:  if the curve C is infinite, or  if C is a (complete) circle or ellipse, and Parameterisation is equal to Convert_TgtThetaOver2_1 or Convert_TgtThetaOver2_2. Standard_ConstructionError:  if C is a (complete) circle or ellipse, and if Parameterisation is not equal to Convert_TgtThetaOver2, Convert_RationalC1, Convert_QuasiAngular (the curve is converted in these three cases) or to Convert_TgtThetaOver2_1 or Convert_TgtThetaOver2_2 (another exception is raised in these two cases).  if C is a trimmed circle or ellipse, if Parameterisation is equal to Convert_TgtThetaOver2_1 and if U2  U1 > 0.9999 * Pi, where U1 and U2 are respectively the first and the last parameters of the trimmed curve (this method of parameterization cannot be used to convert a halfcircle or a halfellipse, for example), or  if C is a trimmed circle or ellipse, if Parameterisation is equal to Convert_TgtThetaOver2_2 and U2  U1 > 1.9999 * Pi where U1 and U2 are respectively the first and the last parameters of the trimmed curve (this method of parameterization cannot be used to convert a quasicomplete circle or ellipse).
Parameters:  C (Handle_Geom_Curve &) –
 Parameterisation (Convert_ParameterisationType) – default value is Convert_TgtThetaOver2
Return type:

geomconvert_SplitBSplineCurve
(*args)¶  Convert a curve from Geom by an approximation method //! This method computes the arc of Bspline curve between the two knots FromK1 and ToK2. If C is periodic the arc has the same orientation as C if SameOrientation = Standard_True. If C is not periodic SameOrientation is not used for the computation and C is oriented from the knot fromK1 to the knot toK2. We just keep the local definition of C between the knots FromK1 and ToK2. The returned Bspline curve has its first and last knots with a multiplicity equal to degree + 1, where degree is the polynomial degree of C. The indexes of the knots FromK1 and ToK2 doesn’t include the repetition of multiple knots in their definition. Raised if FromK1 = ToK2 Raised if FromK1 or ToK2 are out of the bounds [FirstUKnotIndex, LastUKnotIndex]
Parameters: Return type:  This function computes the segment of Bspline curve between the parametric values FromU1, ToU2. If C is periodic the arc has the same orientation as C if SameOrientation = True. If C is not periodic SameOrientation is not used for the computation and C is oriented fromU1 toU2. If U1 and U2 and two parametric values we consider that U1 = U2 if Abs (U1  U2) <= ParametricTolerance and ParametricTolerance must be greater or equal to Resolution from package gp. //! Raised if FromU1 or ToU2 are out of the parametric bounds of the curve (The tolerance criterion is ParametricTolerance). Raised if Abs (FromU1  ToU2) <= ParametricTolerance Raised if ParametricTolerance < Resolution from gp.
Parameters: Return type:

geomconvert_SplitBSplineSurface
(*args)¶  Computes the Bspline surface patche between the knots values FromUK1, ToUK2, FromVK1, ToVK2. If S is periodic in one direction the patche has the same orientation as S in this direction if the flag is true in this direction (SameUOrientation, SameVOrientation). If S is not periodic SameUOrientation and SameVOrientation are not used for the computation and S is oriented FromUK1 ToUK2 and FromVK1 ToVK2. Raised if FromUK1 = ToUK2 or FromVK1 = ToVK2 FromUK1 or ToUK2 are out of the bounds [FirstUKnotIndex, LastUKnotIndex] FromVK1 or ToVK2 are out of the bounds [FirstVKnotIndex, LastVKnotIndex]
Parameters: Return type:  This method splits a Bspline surface patche between the knots values FromK1, ToK2 in one direction. If USplit = True then the splitting direction is the U parametric direction else it is the V parametric direction. If S is periodic in the considered direction the patche has the same orientation as S in this direction if SameOrientation is True If S is not periodic in this direction SameOrientation is not used for the computation and S is oriented FromK1 ToK2. Raised if FromK1 = ToK2 or if FromK1 or ToK2 are out of the bounds [FirstUKnotIndex, LastUKnotIndex] in the considered parametric direction.
Parameters: Return type:  This method computes the Bspline surface patche between the parametric values FromU1, ToU2, FromV1, ToV2. If S is periodic in one direction the patche has the same orientation as S in this direction if the flag is True in this direction (SameUOrientation, SameVOrientation). If S is not periodic SameUOrientation and SameVOrientation are not used for the computation and S is oriented FromU1 ToU2 and FromV1 ToV2. If U1 and U2 and two parametric values we consider that U1 = U2 if Abs (U1  U2) <= ParametricTolerance and ParametricTolerance must be greater or equal to Resolution from package gp. //! Raised if FromU1 or ToU2 or FromV1 or ToU2 are out of the parametric bounds of the surface (the tolerance criterion is ParametricTolerance). Raised if Abs (FromU1  ToU2) <= ParametricTolerance or Abs (FromV1  ToV2) <= ParametricTolerance. Raised if ParametricTolerance < Resolution.
Parameters: Return type:  This method splits the Bspline surface S in one direction between the parametric values FromParam1, ToParam2. If USplit = True then the Splitting direction is the U parametric direction else it is the V parametric direction. If S is periodic in the considered direction the patche has the same orientation as S in this direction if SameOrientation is true. If S is not periodic in the considered direction SameOrientation is not used for the computation and S is oriented FromParam1 ToParam2. If U1 and U2 and two parametric values we consider that U1 = U2 if Abs (U1  U2) <= ParametricTolerance and ParametricTolerance must be greater or equal to Resolution from package gp. //! Raises if FromParam1 or ToParam2 are out of the parametric bounds of the surface in the considered direction. Raises if Abs (FromParam1  ToParam2) <= ParametricTolerance.
Parameters: Return type:

geomconvert_SurfaceToBSplineSurface
(*args)¶  This algorithm converts a non infinite surface from Geom into a Bspline surface. S must be a trimmed plane or a trimmed cylinder or a trimmed cone or a trimmed sphere or a trimmed torus or a sphere or a torus or a Bezier surface of a trimmed Bezier surface or a trimmed swept surface with a corresponding basis curve which can be turned into a Bspline curve (see the method CurveToBSplineCurve). Raises DomainError if the type of the surface is not previously defined.
Parameters: S (Handle_Geom_Surface &) – Return type: Handle_Geom_BSplineSurface

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