OCC.GeomConvert module

class OCC.GeomConvert.GeomConvert_ApproxCurve(*args)

Bases: object

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 OCC.GeomConvert.GeomConvert_ApproxSurface(*args)

Bases: object

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
IsDone()
  • Returns Standard_True if the approximation has be done
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 OCC.GeomConvert.GeomConvert_BSplineCurveKnotSplitting(*args)

Bases: object

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 (Standard_Integer) –
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 OCC.GeomConvert.GeomConvert_BSplineCurveToBezierCurve(*args)

Bases: object

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 (Standard_Integer) –
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 B-spline curve the number of BezierCurve arcs NbArcs is equal to the number of knots less one.
Return type:int
thisown

The membership flag

class OCC.GeomConvert.GeomConvert_BSplineSurfaceKnotSplitting(*args)

Bases: object

NbUSplits()
  • Returns the number of u-isoparametric 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 v-isoparametric 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:

None

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 (Standard_Integer) –
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 (Standard_Integer) –
Return type:int
thisown

The membership flag

class OCC.GeomConvert.GeomConvert_BSplineSurfaceToBezierSurface(*args)

Bases: object

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 B-spline 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 B-spline 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 u-isoparametric 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 v-isoparametric 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:
  • UIndex (Standard_Integer) –
  • VIndex (Standard_Integer) –
Return type:

Handle_Geom_BezierSurface

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 u-isoparametric curves of the surface. A column in the array corresponds to a series of adjacent patches, all limited by the same two v-isoparametric 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 u-knots 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 v-knots 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 OCC.GeomConvert.GeomConvert_CompBezierSurfacesToBSplineSurface(*args)

Bases: object

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 OCC.GeomConvert.GeomConvert_CompCurveToBSplineCurve(*args)

Bases: object

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:
  • NewCurve (Handle_Geom_BoundedCurve &) –
  • Tolerance (float) –
  • After (bool) – default value is Standard_False
  • WithRatio (bool) – default value is Standard_True
  • MinM (Standard_Integer) – default value is 0
Return type:

bool

  • 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:
  • NewCurve (Handle_Geom_BoundedCurve &) –
  • Tolerance (float) –
  • After (bool) – default value is Standard_False
  • WithRatio (bool) – default value is Standard_True
  • MinM (Standard_Integer) – default value is 0
Return type:

bool

  • 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:
  • NewCurve (Handle_Geom_BoundedCurve &) –
  • Tolerance (float) –
  • After (bool) – default value is Standard_False
  • WithRatio (bool) – default value is Standard_True
  • MinM (Standard_Integer) – default value is 0
Return type:

bool

  • 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:
  • NewCurve (Handle_Geom_BoundedCurve &) –
  • Tolerance (float) –
  • After (bool) – default value is Standard_False
  • WithRatio (bool) – default value is Standard_True
  • MinM (Standard_Integer) – default value is 0
Return type:

bool

BSplineCurve()
Return type:Handle_Geom_BSplineCurve
thisown

The membership flag

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

Bases: object

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

The membership flag

value()
class OCC.GeomConvert.geomconvert(*args, **kwargs)

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:
  • BS (Handle_Geom_BSplineCurve &) –
  • tabBS (Handle_TColGeom_HArray1OfBSplineCurve &) –
  • AngularTolerance (float) –
  • tolerance (float) –
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:
  • BS (Handle_Geom_BSplineCurve &) –
  • tolerance (float) –
  • AngularTolerance (float) – default value is 1.0e-7
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 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:
  • BS (Handle_Geom_BSplineCurve &) –
  • tolerance (float) –
  • AngularTolerance (float) – default value is 1.0e-7
Return type:

void

static ConcatC1(*args)
  • This Method concatenates C1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N-1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N-2] 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:
  • ArrayOfCurves (TColGeom_Array1OfBSplineCurve &) –
  • ArrayOfToler (TColStd_Array1OfReal &) –
  • ArrayOfIndices (Handle_TColStd_HArray1OfInteger &) –
  • ArrayOfConcatenated (Handle_TColGeom_HArray1OfBSplineCurve &) –
  • ClosedG1Flag (bool) –
  • ClosedTolerance (float) –
Return type:

void

  • This Method concatenates C1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N-1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N-2] 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:
  • ArrayOfCurves (TColGeom_Array1OfBSplineCurve &) –
  • ArrayOfToler (TColStd_Array1OfReal &) –
  • ArrayOfIndices (Handle_TColStd_HArray1OfInteger &) –
  • ArrayOfConcatenated (Handle_TColGeom_HArray1OfBSplineCurve &) –
  • ClosedG1Flag (bool) –
  • ClosedTolerance (float) –
  • AngularTolerance (float) –
Return type:

void

static ConcatG1(*args)
  • This Method concatenates G1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N-1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N-2] 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:
  • ArrayOfCurves (TColGeom_Array1OfBSplineCurve &) –
  • ArrayOfToler (TColStd_Array1OfReal &) –
  • ArrayOfConcatenated (Handle_TColGeom_HArray1OfBSplineCurve &) –
  • ClosedG1Flag (bool) –
  • ClosedTolerance (float) –
Return type:

void

static CurveToBSplineCurve(*args)
  • This function converts a non infinite curve from Geom into a B-spline 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 B-spline 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 half-circle or a half-ellipse, 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 quasi-complete circle or ellipse).
Parameters:
  • C (Handle_Geom_Curve &) –
  • Parameterisation (Convert_ParameterisationType) – default value is Convert_TgtThetaOver2
Return type:

Handle_Geom_BSplineCurve

  • This function converts a non infinite curve from Geom into a B-spline 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 B-spline 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 half-circle or a half-ellipse, 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 quasi-complete circle or ellipse).
Parameters:
  • C (Handle_Geom_Curve &) –
  • Parameterisation (Convert_ParameterisationType) – default value is Convert_TgtThetaOver2
Return type:

Handle_Geom_BSplineCurve

static SplitBSplineCurve(*args)
  • Convert a curve from Geom by an approximation method This method computes the arc of B-spline 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 B-spline 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:
  • C (Handle_Geom_BSplineCurve &) –
  • FromK1 (Standard_Integer) –
  • ToK2 (Standard_Integer) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineCurve

  • Convert a curve from Geom by an approximation method This method computes the arc of B-spline 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 B-spline 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:
  • C (Handle_Geom_BSplineCurve &) –
  • FromK1 (Standard_Integer) –
  • ToK2 (Standard_Integer) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineCurve

  • This function computes the segment of B-spline 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:
  • C (Handle_Geom_BSplineCurve &) –
  • FromU1 (float) –
  • ToU2 (float) –
  • ParametricTolerance (float) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineCurve

  • This function computes the segment of B-spline 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:
  • C (Handle_Geom_BSplineCurve &) –
  • FromU1 (float) –
  • ToU2 (float) –
  • ParametricTolerance (float) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineCurve

static SplitBSplineSurface(*args)
  • Computes the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromUK1 (Standard_Integer) –
  • ToUK2 (Standard_Integer) –
  • FromVK1 (Standard_Integer) –
  • ToVK2 (Standard_Integer) –
  • SameUOrientation (bool) – default value is Standard_True
  • SameVOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • Computes the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromUK1 (Standard_Integer) –
  • ToUK2 (Standard_Integer) –
  • FromVK1 (Standard_Integer) –
  • ToVK2 (Standard_Integer) –
  • SameUOrientation (bool) – default value is Standard_True
  • SameVOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • Computes the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromUK1 (Standard_Integer) –
  • ToUK2 (Standard_Integer) –
  • FromVK1 (Standard_Integer) –
  • ToVK2 (Standard_Integer) –
  • SameUOrientation (bool) – default value is Standard_True
  • SameVOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method splits a B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromK1 (Standard_Integer) –
  • ToK2 (Standard_Integer) –
  • USplit (bool) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method splits a B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromK1 (Standard_Integer) –
  • ToK2 (Standard_Integer) –
  • USplit (bool) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method computes the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromU1 (float) –
  • ToU2 (float) –
  • FromV1 (float) –
  • ToV2 (float) –
  • ParametricTolerance (float) –
  • SameUOrientation (bool) – default value is Standard_True
  • SameVOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method computes the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromU1 (float) –
  • ToU2 (float) –
  • FromV1 (float) –
  • ToV2 (float) –
  • ParametricTolerance (float) –
  • SameUOrientation (bool) – default value is Standard_True
  • SameVOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method computes the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromU1 (float) –
  • ToU2 (float) –
  • FromV1 (float) –
  • ToV2 (float) –
  • ParametricTolerance (float) –
  • SameUOrientation (bool) – default value is Standard_True
  • SameVOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method splits the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromParam1 (float) –
  • ToParam2 (float) –
  • USplit (bool) –
  • ParametricTolerance (float) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method splits the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromParam1 (float) –
  • ToParam2 (float) –
  • USplit (bool) –
  • ParametricTolerance (float) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

static SurfaceToBSplineSurface(*args)
  • This algorithm converts a non infinite surface from Geom into a B-spline 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 B-spline 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

OCC.GeomConvert.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:
  • BS (Handle_Geom_BSplineCurve &) –
  • tabBS (Handle_TColGeom_HArray1OfBSplineCurve &) –
  • AngularTolerance (float) –
  • tolerance (float) –
Return type:

void

OCC.GeomConvert.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:
  • BS (Handle_Geom_BSplineCurve &) –
  • tolerance (float) –
  • AngularTolerance (float) – default value is 1.0e-7
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 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:
  • BS (Handle_Geom_BSplineCurve &) –
  • tolerance (float) –
  • AngularTolerance (float) – default value is 1.0e-7
Return type:

void

OCC.GeomConvert.geomconvert_ConcatC1(*args)
  • This Method concatenates C1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N-1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N-2] 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:
  • ArrayOfCurves (TColGeom_Array1OfBSplineCurve &) –
  • ArrayOfToler (TColStd_Array1OfReal &) –
  • ArrayOfIndices (Handle_TColStd_HArray1OfInteger &) –
  • ArrayOfConcatenated (Handle_TColGeom_HArray1OfBSplineCurve &) –
  • ClosedG1Flag (bool) –
  • ClosedTolerance (float) –
Return type:

void

  • This Method concatenates C1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N-1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N-2] 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:
  • ArrayOfCurves (TColGeom_Array1OfBSplineCurve &) –
  • ArrayOfToler (TColStd_Array1OfReal &) –
  • ArrayOfIndices (Handle_TColStd_HArray1OfInteger &) –
  • ArrayOfConcatenated (Handle_TColGeom_HArray1OfBSplineCurve &) –
  • ClosedG1Flag (bool) –
  • ClosedTolerance (float) –
  • AngularTolerance (float) –
Return type:

void

OCC.GeomConvert.geomconvert_ConcatG1(*args)
  • This Method concatenates G1 the ArrayOfCurves as far as it is possible. ArrayOfCurves[0..N-1] ArrayOfToler contains the biggest tolerance of the two points shared by two consecutives curves. Its dimension: [0..N-2] 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:
  • ArrayOfCurves (TColGeom_Array1OfBSplineCurve &) –
  • ArrayOfToler (TColStd_Array1OfReal &) –
  • ArrayOfConcatenated (Handle_TColGeom_HArray1OfBSplineCurve &) –
  • ClosedG1Flag (bool) –
  • ClosedTolerance (float) –
Return type:

void

OCC.GeomConvert.geomconvert_CurveToBSplineCurve(*args)
  • This function converts a non infinite curve from Geom into a B-spline 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 B-spline 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 half-circle or a half-ellipse, 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 quasi-complete circle or ellipse).
Parameters:
  • C (Handle_Geom_Curve &) –
  • Parameterisation (Convert_ParameterisationType) – default value is Convert_TgtThetaOver2
Return type:

Handle_Geom_BSplineCurve

  • This function converts a non infinite curve from Geom into a B-spline 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 B-spline 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 half-circle or a half-ellipse, 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 quasi-complete circle or ellipse).
Parameters:
  • C (Handle_Geom_Curve &) –
  • Parameterisation (Convert_ParameterisationType) – default value is Convert_TgtThetaOver2
Return type:

Handle_Geom_BSplineCurve

OCC.GeomConvert.geomconvert_SplitBSplineCurve(*args)
  • Convert a curve from Geom by an approximation method This method computes the arc of B-spline 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 B-spline 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:
  • C (Handle_Geom_BSplineCurve &) –
  • FromK1 (Standard_Integer) –
  • ToK2 (Standard_Integer) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineCurve

  • Convert a curve from Geom by an approximation method This method computes the arc of B-spline 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 B-spline 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:
  • C (Handle_Geom_BSplineCurve &) –
  • FromK1 (Standard_Integer) –
  • ToK2 (Standard_Integer) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineCurve

  • This function computes the segment of B-spline 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:
  • C (Handle_Geom_BSplineCurve &) –
  • FromU1 (float) –
  • ToU2 (float) –
  • ParametricTolerance (float) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineCurve

  • This function computes the segment of B-spline 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:
  • C (Handle_Geom_BSplineCurve &) –
  • FromU1 (float) –
  • ToU2 (float) –
  • ParametricTolerance (float) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineCurve

OCC.GeomConvert.geomconvert_SplitBSplineSurface(*args)
  • Computes the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromUK1 (Standard_Integer) –
  • ToUK2 (Standard_Integer) –
  • FromVK1 (Standard_Integer) –
  • ToVK2 (Standard_Integer) –
  • SameUOrientation (bool) – default value is Standard_True
  • SameVOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • Computes the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromUK1 (Standard_Integer) –
  • ToUK2 (Standard_Integer) –
  • FromVK1 (Standard_Integer) –
  • ToVK2 (Standard_Integer) –
  • SameUOrientation (bool) – default value is Standard_True
  • SameVOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • Computes the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromUK1 (Standard_Integer) –
  • ToUK2 (Standard_Integer) –
  • FromVK1 (Standard_Integer) –
  • ToVK2 (Standard_Integer) –
  • SameUOrientation (bool) – default value is Standard_True
  • SameVOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method splits a B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromK1 (Standard_Integer) –
  • ToK2 (Standard_Integer) –
  • USplit (bool) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method splits a B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromK1 (Standard_Integer) –
  • ToK2 (Standard_Integer) –
  • USplit (bool) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method computes the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromU1 (float) –
  • ToU2 (float) –
  • FromV1 (float) –
  • ToV2 (float) –
  • ParametricTolerance (float) –
  • SameUOrientation (bool) – default value is Standard_True
  • SameVOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method computes the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromU1 (float) –
  • ToU2 (float) –
  • FromV1 (float) –
  • ToV2 (float) –
  • ParametricTolerance (float) –
  • SameUOrientation (bool) – default value is Standard_True
  • SameVOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method computes the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromU1 (float) –
  • ToU2 (float) –
  • FromV1 (float) –
  • ToV2 (float) –
  • ParametricTolerance (float) –
  • SameUOrientation (bool) – default value is Standard_True
  • SameVOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method splits the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromParam1 (float) –
  • ToParam2 (float) –
  • USplit (bool) –
  • ParametricTolerance (float) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

  • This method splits the B-spline 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:
  • S (Handle_Geom_BSplineSurface &) –
  • FromParam1 (float) –
  • ToParam2 (float) –
  • USplit (bool) –
  • ParametricTolerance (float) –
  • SameOrientation (bool) – default value is Standard_True
Return type:

Handle_Geom_BSplineSurface

OCC.GeomConvert.geomconvert_SurfaceToBSplineSurface(*args)
  • This algorithm converts a non infinite surface from Geom into a B-spline 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 B-spline 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