OCC.CPnts module

class CPnts_AbscissaPoint(*args)

Bases: object

Return type:None
  • the algorithm computes a point on a curve <Curve> at the distance <Abscissa> from the point of parameter <U0>. <Resolution> is the error allowed in the computation. The computed point can be outside of the curve ‘s bounds.
Parameters:
  • C (Adaptor3d_Curve &) –
  • Abscissa (float) –
  • U0 (float) –
  • Resolution (float) –
Return type:

None

  • the algorithm computes a point on a curve <Curve> at the distance <Abscissa> from the point of parameter <U0>. <Resolution> is the error allowed in the computation. The computed point can be outside of the curve ‘s bounds.
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • Abscissa (float) –
  • U0 (float) –
  • Resolution (float) –
Return type:

None

  • the algorithm computes a point on a curve <Curve> at the distance <Abscissa> from the point of parameter <U0>. <Ui> is the starting value used in the iterative process which find the solution, it must be closed to the final solution <Resolution> is the error allowed in the computation. The computed point can be outside of the curve ‘s bounds.
Parameters:
  • C (Adaptor3d_Curve &) –
  • Abscissa (float) –
  • U0 (float) –
  • Ui (float) –
  • Resolution (float) –
Return type:

None

  • the algorithm computes a point on a curve <Curve> at the distance <Abscissa> from the point of parameter <U0>. <Ui> is the starting value used in the iterative process which find the solution, it must be closed to the final solution <Resolution> is the error allowed in the computation. The computed point can be outside of the curve ‘s bounds.
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • Abscissa (float) –
  • U0 (float) –
  • Ui (float) –
  • Resolution (float) –
Return type:

None

AdvPerform()
  • Computes the point at the distance <Abscissa> of the curve; performs more appropriate tolerance managment; to use this method in right way it is necessary to call empty consructor. then call method Init with Tolerance = Resolution, then call AdvPermorm.
Parameters:
Return type:

None

Init()
  • Initializes the resolution function with <C>.
Parameters:C (Adaptor3d_Curve &) –
Return type:None
  • Initializes the resolution function with <C>.
Parameters:C (Adaptor2d_Curve2d &) –
Return type:None
  • Initializes the resolution function with <C>.
Parameters:
  • C (Adaptor3d_Curve &) –
  • Tol (float) –
Return type:

None

  • Initializes the resolution function with <C>.
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • Tol (float) –
Return type:

None

  • Initializes the resolution function with <C> between U1 and U2.
Parameters:
  • C (Adaptor3d_Curve &) –
  • U1 (float) –
  • U2 (float) –
Return type:

None

  • Initializes the resolution function with <C> between U1 and U2.
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • U1 (float) –
  • U2 (float) –
Return type:

None

  • Initializes the resolution function with <C> between U1 and U2.
Parameters:
Return type:

None

  • Initializes the resolution function with <C> between U1 and U2.
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • U1 (float) –
  • U2 (float) –
  • Tol (float) –
Return type:

None

IsDone()
  • True if the computation was successful, False otherwise.
Return type:bool
static Length(*args)
  • Computes the length of the Curve <C>.
Parameters:C (Adaptor3d_Curve &) –
Return type:float
  • Computes the length of the Curve <C>.
Parameters:C (Adaptor2d_Curve2d &) –
Return type:float
  • Computes the length of the Curve <C> with the given tolerance.
Parameters:
  • C (Adaptor3d_Curve &) –
  • Tol (float) –
Return type:

float

  • Computes the length of the Curve <C> with the given tolerance.
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • Tol (float) –
Return type:

float

  • Computes the length of the Curve <C> between <U1> and <U2>.
Parameters:
  • C (Adaptor3d_Curve &) –
  • U1 (float) –
  • U2 (float) –
Return type:

float

  • Computes the length of the Curve <C> between <U1> and <U2>.
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • U1 (float) –
  • U2 (float) –
Return type:

float

  • Computes the length of the Curve <C> between <U1> and <U2> with the given tolerance.
Parameters:
Return type:

float

  • Computes the length of the Curve <C> between <U1> and <U2> with the given tolerance. creation of a indefinite AbscissaPoint.
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • U1 (float) –
  • U2 (float) –
  • Tol (float) –
Return type:

float

Parameter()
  • Returns the parameter of the solution.
Return type:float
Perform()
  • Computes the point at the distance <Abscissa> of the curve.
Parameters:
Return type:

None

  • Computes the point at the distance <Abscissa> of the curve.
Parameters:
Return type:

None

SetParameter()
  • Enforce the solution, used by GCPnts.
Parameters:P (float) –
Return type:None
thisown

The membership flag

CPnts_AbscissaPoint_Length(*args)
  • Computes the length of the Curve <C>.
Parameters:C (Adaptor3d_Curve &) –
Return type:float
  • Computes the length of the Curve <C>.
Parameters:C (Adaptor2d_Curve2d &) –
Return type:float
  • Computes the length of the Curve <C> with the given tolerance.
Parameters:
  • C (Adaptor3d_Curve &) –
  • Tol (float) –
Return type:

float

  • Computes the length of the Curve <C> with the given tolerance.
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • Tol (float) –
Return type:

float

  • Computes the length of the Curve <C> between <U1> and <U2>.
Parameters:
  • C (Adaptor3d_Curve &) –
  • U1 (float) –
  • U2 (float) –
Return type:

float

  • Computes the length of the Curve <C> between <U1> and <U2>.
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • U1 (float) –
  • U2 (float) –
Return type:

float

  • Computes the length of the Curve <C> between <U1> and <U2> with the given tolerance.
Parameters:
Return type:

float

  • Computes the length of the Curve <C> between <U1> and <U2> with the given tolerance. creation of a indefinite AbscissaPoint.
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • U1 (float) –
  • U2 (float) –
  • Tol (float) –
Return type:

float

class CPnts_MyGaussFunction(*args)

Bases: OCC.math.math_Function

Return type:None
Init()
  • F is a pointer on a function D is a client data //! Each value is computed with F(D)
Parameters:
  • F (CPnts_RealFunction &) –
  • D (Standard_Address) –
Return type:

None

thisown

The membership flag

class CPnts_MyRootFunction(*args)

Bases: OCC.math.math_FunctionWithDerivative

Return type:None
Init()
  • F is a pointer on a function D is a client data Order is the order of integration to use
Parameters:
  • F (CPnts_RealFunction &) –
  • D (Standard_Address) –
  • Order (int) –
Return type:

None

  • We want to solve Integral(X0,X,F(X,D)) = L
Parameters:
Return type:

None

  • We want to solve Integral(X0,X,F(X,D)) = L with given tolerance
Parameters:
Return type:

None

thisown

The membership flag

class CPnts_UniformDeflection(*args)

Bases: object

  • creation of a indefinite UniformDeflection
Return type:None
  • Computes a uniform deflection distribution of points on the curve <C>. <Deflection> defines the constant deflection value. The algorithm computes the number of points and the points. The curve <C> must be at least C2 else the computation can fail. If just some parts of the curve is C2 it is better to give the parameters bounds and to use the below constructor . if <WithControl> is True, the algorithm controls the estimate deflection when the curve is singular at the point P(u),the algorithm computes the next point as P(u + Max(CurrentStep,Abs(LastParameter-FirstParameter))) if the singularity is at the first point ,the next point calculated is the P(LastParameter)
Parameters:
  • C (Adaptor3d_Curve &) –
  • Deflection (float) –
  • Resolution (float) –
  • WithControl (bool) –
Return type:

None

  • As above with 2d curve
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • Deflection (float) –
  • Resolution (float) –
  • WithControl (bool) –
Return type:

None

  • Computes an uniform deflection distribution of points on a part of the curve <C>. Deflection defines the step between the points. <U1> and <U2> define the distribution span. <U1> and <U2> must be in the parametric range of the curve.
Parameters:
  • C (Adaptor3d_Curve &) –
  • Deflection (float) –
  • U1 (float) –
  • U2 (float) –
  • Resolution (float) –
  • WithControl (bool) –
Return type:

None

  • As above with 2d curve
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • Deflection (float) –
  • U1 (float) –
  • U2 (float) –
  • Resolution (float) –
  • WithControl (bool) –
Return type:

None

Initialize()
  • Initialize the algoritms with <C>, <Deflection>, <UStep>, <Resolution> and <WithControl>
Parameters:
  • C (Adaptor3d_Curve &) –
  • Deflection (float) –
  • Resolution (float) –
  • WithControl (bool) –
Return type:

None

  • Initialize the algoritms with <C>, <Deflection>, <UStep>, <Resolution> and <WithControl>
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • Deflection (float) –
  • Resolution (float) –
  • WithControl (bool) –
Return type:

None

  • Initialize the algoritms with <C>, <Deflection>, <UStep>, <U1>, <U2> and <WithControl>
Parameters:
  • C (Adaptor3d_Curve &) –
  • Deflection (float) –
  • U1 (float) –
  • U2 (float) –
  • Resolution (float) –
  • WithControl (bool) –
Return type:

None

  • Initialize the algoritms with <C>, <Deflection>, <UStep>, <U1>, <U2> and <WithControl>
Parameters:
  • C (Adaptor2d_Curve2d &) –
  • Deflection (float) –
  • U1 (float) –
  • U2 (float) –
  • Resolution (float) –
  • WithControl (bool) –
Return type:

None

IsAllDone()
  • To know if all the calculus were done successfully (ie all the points have been computed). The calculus can fail if the Curve is not C1 in the considered domain. Returns True if the calculus was successful.
Return type:bool
More()
  • returns True if it exists a next Point.
Return type:bool
Next()
  • go to the next Point.
Return type:None
Point()
  • return the computed parameter
Return type:gp_Pnt
Value()
  • return the computed parameter
Return type:float
thisown

The membership flag

class SwigPyIterator(*args, **kwargs)

Bases: object

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

The membership flag

value()
register_handle(handle, base_object)

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