OCC.CPnts module¶
- Purpose :This package contains the definition of the geometricalgorithms used to compute characteristic points onparametrized curves in 3d or 2d space.This package defines the external geometric entities, withtheir requirements, used in the algorithms.
-
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: Return type: - 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: Return type: - 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: Return type: - 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: Return type: -
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. U0 is the parameter of the point from which the distance is measured and Ui is the starting value for the iterative process (should be close to the final solution).
Parameters: Return type:
-
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: - Initializes the resolution function with <C>.
Parameters: - C (Adaptor2d_Curve2d &) –
- Tol (float) –
Return type: - Initializes the resolution function with <C> between U1 and U2.
Parameters: Return type: - Initializes the resolution function with <C> between U1 and U2.
Parameters: Return type: - Initializes the resolution function with <C> between U1 and U2.
Parameters: Return type: - Initializes the resolution function with <C> between U1 and U2.
Parameters: Return type:
-
static
Length
()¶ - 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: - Computes the length of the Curve <C> with the given tolerance.
Parameters: - C (Adaptor2d_Curve2d &) –
- Tol (float) –
Return type: - Computes the length of the Curve <C> between <U1> and <U2>.
Parameters: Return type: - Computes the length of the Curve <C> between <U1> and <U2>.
Parameters: Return type: - Computes the length of the Curve <C> between <U1> and <U2> with the given tolerance.
Parameters: Return type: - Computes the length of the Curve <C> between <U1> and <U2> with the given tolerance. creation of a indefinite AbscissaPoint.
Parameters: Return type:
-
Perform
()¶ - Computes the point at the distance <Abscissa> of the curve. U0 is the parameter of the point from which the distance is measured.
Parameters: Return type: - Computes the point at the distance <Abscissa> of the curve. U0 is the parameter of the point from which the distance is measured and Ui is the starting value for the iterative process (should be close to the final solution).
Parameters: Return type:
-
thisown
¶ The membership flag
-
CPnts_AbscissaPoint_Length
()¶ - 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: - Computes the length of the Curve <C> with the given tolerance.
Parameters: - C (Adaptor2d_Curve2d &) –
- Tol (float) –
Return type: - Computes the length of the Curve <C> between <U1> and <U2>.
Parameters: Return type: - Computes the length of the Curve <C> between <U1> and <U2>.
Parameters: Return type: - Computes the length of the Curve <C> between <U1> and <U2> with the given tolerance.
Parameters: Return type: - Computes the length of the Curve <C> between <U1> and <U2> with the given tolerance. creation of a indefinite AbscissaPoint.
Parameters: Return type:
-
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:
-
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: - We want to solve Integral(X0,X,F(X,D)) = L
Parameters: Return type: - We want to solve Integral(X0,X,F(X,D)) = L with given tolerance
Parameters: Return type:
-
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: Return type: - As above with 2d curve
Parameters: Return type: - 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: Return type: - As above with 2d curve
Parameters: Return type: -
Initialize
()¶ - Initialize the algoritms with <C>, <Deflection>, <UStep>, <Resolution> and <WithControl>
Parameters: Return type: - Initialize the algoritms with <C>, <Deflection>, <UStep>, <Resolution> and <WithControl>
Parameters: Return type: - Initialize the algoritms with <C>, <Deflection>, <UStep>, <U1>, <U2> and <WithControl>
Parameters: Return type: - Initialize the algoritms with <C>, <Deflection>, <UStep>, <U1>, <U2> and <WithControl>
Parameters: Return type:
-
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
-
thisown
¶ The membership flag
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
thisown
¶ The membership flag
-
value
()¶
-
-
new_instancemethod
(func, inst, cls)¶
-
register_handle
(handle, base_object)¶ Inserts the handle into the base object to prevent memory corruption in certain cases