OCC.Core.CPnts module¶
CPnts module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_cpnts.html
-
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. :param C: :type C: Adaptor3d_Curve :param Abscissa: :type Abscissa: float :param U0: :type U0: float :param Resolution: :type Resolution: float :rtype: 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. :param C: :type C: Adaptor2d_Curve2d :param Abscissa: :type Abscissa: float :param U0: :type U0: float :param Resolution: :type Resolution: float :rtype: 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. :param C: :type C: Adaptor3d_Curve :param Abscissa: :type Abscissa: float :param U0: :type U0: float :param Ui: :type Ui: float :param Resolution: :type Resolution: float :rtype: 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. :param C: :type C: Adaptor2d_Curve2d :param Abscissa: :type Abscissa: float :param U0: :type U0: float :param Ui: :type Ui: float :param Resolution: :type Resolution: float :rtype: 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. 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).
- param Abscissa
- type Abscissa
float
- param U0
- type U0
float
- param Ui
- type Ui
float
- param Resolution
- type Resolution
float
- rtype
None
-
Init
()¶ - Initializes the resolution function with <C>.
- param C
- type C
Adaptor3d_Curve
- rtype
None* Initializes the resolution function with <C>.
- param C
- type C
Adaptor2d_Curve2d
- rtype
None* Initializes the resolution function with <C>.
- param C
- type C
Adaptor3d_Curve
- param Tol
- type Tol
float
- rtype
None* Initializes the resolution function with <C>.
- param C
- type C
Adaptor2d_Curve2d
- param Tol
- type Tol
float
- rtype
None* Initializes the resolution function with <C> between U1 and U2.
- param C
- type C
Adaptor3d_Curve
- param U1
- type U1
float
- param U2
- type U2
float
- rtype
None* Initializes the resolution function with <C> between U1 and U2.
- param C
- type C
Adaptor2d_Curve2d
- param U1
- type U1
float
- param U2
- type U2
float
- rtype
None* Initializes the resolution function with <C> between U1 and U2.
- param C
- type C
Adaptor3d_Curve
- param U1
- type U1
float
- param U2
- type U2
float
- param Tol
- type Tol
float
- rtype
None* Initializes the resolution function with <C> between U1 and U2.
- param C
- type C
Adaptor2d_Curve2d
- param U1
- type U1
float
- param U2
- type U2
float
- param Tol
- type Tol
float
- rtype
None
-
IsDone
()¶ - True if the computation was successful, False otherwise.
- rtype
bool
-
static
Length
()¶ - Computes the length of the Curve <C>.
- param C
- type C
Adaptor3d_Curve
- rtype
float* Computes the length of the Curve <C>.
- param C
- type C
Adaptor2d_Curve2d
- rtype
float* Computes the length of the Curve <C> with the given tolerance.
- param C
- type C
Adaptor3d_Curve
- param Tol
- type Tol
float
- rtype
float* Computes the length of the Curve <C> with the given tolerance.
- param C
- type C
Adaptor2d_Curve2d
- param Tol
- type Tol
float
- rtype
float* Computes the length of the Curve <C> between <U1> and <U2>.
- param C
- type C
Adaptor3d_Curve
- param U1
- type U1
float
- param U2
- type U2
float
- rtype
float* Computes the length of the Curve <C> between <U1> and <U2>.
- param C
- type C
Adaptor2d_Curve2d
- param U1
- type U1
float
- param U2
- type U2
float
- rtype
float* Computes the length of the Curve <C> between <U1> and <U2> with the given tolerance.
- param C
- type C
Adaptor3d_Curve
- param U1
- type U1
float
- param U2
- type U2
float
- param Tol
- type Tol
float
- rtype
float* Computes the length of the Curve <C> between <U1> and <U2> with the given tolerance. creation of a indefinite AbscissaPoint.
- param C
- type C
Adaptor2d_Curve2d
- param U1
- type U1
float
- param U2
- type U2
float
- param Tol
- type Tol
float
- rtype
float
-
Parameter
()¶ - Returns the parameter of the solution.
- rtype
float
-
Perform
()¶ - Computes the point at the distance <Abscissa> of the curve. U0 is the parameter of the point from which the distance is measured.
- param Abscissa
- type Abscissa
float
- param U0
- type U0
float
- param Resolution
- type Resolution
float
- rtype
None* 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).
- param Abscissa
- type Abscissa
float
- param U0
- type U0
float
- param Ui
- type Ui
float
- param Resolution
- type Resolution
float
- rtype
None
-
SetParameter
()¶ - Enforce the solution, used by GCPnts.
- param P
- type P
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
CPnts_MyGaussFunction
(*args)¶ Bases:
OCC.Core.math.math_Function
- Return type
-
Init
()¶ - F is a pointer on a function D is a client data //! Each value is computed with F(D)
- param F
- type F
CPnts_RealFunction
- param D
- type D
Standard_Address
- rtype
None
-
property
thisown
¶ The membership flag
-
class
CPnts_MyRootFunction
(*args)¶ Bases:
OCC.Core.math.math_FunctionWithDerivative
- Return type
-
Init
()¶ - F is a pointer on a function D is a client data Order is the order of integration to use
- param F
- type F
CPnts_RealFunction
- param D
- type D
Standard_Address
- param Order
- type Order
int
- rtype
None* We want to solve Integral(X0,X,F(X,D)) = L
- param X0
- type X0
float
- param L
- type L
float
- rtype
None* We want to solve Integral(X0,X,F(X,D)) = L with given tolerance
- param X0
- type X0
float
- param L
- type L
float
- param Tol
- type Tol
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
CPnts_UniformDeflection
(*args)¶ Bases:
object
- creation of a indefinite UniformDeflection
- rtype
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)
- param C
- type C
Adaptor3d_Curve
- param Deflection
- type Deflection
float
- param Resolution
- type Resolution
float
- param WithControl
- type WithControl
bool
- rtype
None* As above with 2d curve
- param C
- type C
Adaptor2d_Curve2d
- param Deflection
- type Deflection
float
- param Resolution
- type Resolution
float
- param WithControl
- type WithControl
bool
- rtype
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.
- param C
- type C
Adaptor3d_Curve
- param Deflection
- type Deflection
float
- param U1
- type U1
float
- param U2
- type U2
float
- param Resolution
- type Resolution
float
- param WithControl
- type WithControl
bool
- rtype
None* As above with 2d curve
- param C
- type C
Adaptor2d_Curve2d
- param Deflection
- type Deflection
float
- param U1
- type U1
float
- param U2
- type U2
float
- param Resolution
- type Resolution
float
- param WithControl
- type WithControl
bool
- rtype
None
-
Initialize
()¶ - Initialize the algoritms with <C>, <Deflection>, <UStep>, <Resolution> and <WithControl>
- param C
- type C
Adaptor3d_Curve
- param Deflection
- type Deflection
float
- param Resolution
- type Resolution
float
- param WithControl
- type WithControl
bool
- rtype
None* Initialize the algoritms with <C>, <Deflection>, <UStep>, <Resolution> and <WithControl>
- param C
- type C
Adaptor2d_Curve2d
- param Deflection
- type Deflection
float
- param Resolution
- type Resolution
float
- param WithControl
- type WithControl
bool
- rtype
None* Initialize the algoritms with <C>, <Deflection>, <UStep>, <U1>, <U2> and <WithControl>
- param C
- type C
Adaptor3d_Curve
- param Deflection
- type Deflection
float
- param U1
- type U1
float
- param U2
- type U2
float
- param Resolution
- type Resolution
float
- param WithControl
- type WithControl
bool
- rtype
None* Initialize the algoritms with <C>, <Deflection>, <UStep>, <U1>, <U2> and <WithControl>
- param C
- type C
Adaptor2d_Curve2d
- param Deflection
- type Deflection
float
- param U1
- type U1
float
- param U2
- type U2
float
- param Resolution
- type Resolution
float
- param WithControl
- type WithControl
bool
- rtype
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.
- rtype
bool
-
More
()¶ - returns True if it exists a next Point.
- rtype
bool
-
Next
()¶ - go to the next Point.
- rtype
None
-
Point
()¶ - return the computed parameter
- rtype
gp_Pnt
-
Value
()¶ - return the computed parameter
- rtype
float
-
property
thisown
¶ The membership flag