OCC.Core.GCPnts module¶
GCPnts module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_gcpnts.html
-
class
GCPnts_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>. :param C: :type C: Adaptor3d_Curve :param Abscissa: :type Abscissa: float :param U0: :type U0: float :rtype: None* the algorithm computes a point on a curve <Curve> at the distance <Abscissa> from the point of parameter <U0> with the given tolerance. :param Tol: :type Tol: float :param C: :type C: Adaptor3d_Curve :param Abscissa: :type Abscissa: float :param U0: :type U0: float :rtype: None* the algorithm computes a point on a curve <Curve> at the distance <Abscissa> from the point of parameter <U0> with the given tolerance. :param Tol: :type Tol: float :param C: :type C: Adaptor2d_Curve2d :param Abscissa: :type Abscissa: float :param U0: :type U0: float :rtype: None* the algorithm computes a point on a curve <Curve> at the distance <Abscissa> from the point of parameter <U0>. :param C: :type C: Adaptor2d_Curve2d :param Abscissa: :type Abscissa: float :param U0: :type U0: 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 close to the final solution :param C: :type C: Adaptor3d_Curve :param Abscissa: :type Abscissa: float :param U0: :type U0: float :param Ui: :type Ui: 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 :param C: :type C: Adaptor2d_Curve2d :param Abscissa: :type Abscissa: float :param U0: :type U0: float :param Ui: :type Ui: 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 close to the final solution :param C: :type C: Adaptor3d_Curve :param Abscissa: :type Abscissa: float :param U0: :type U0: float :param Ui: :type Ui: float :param Tol: :type Tol: 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 close to the final solution :param C: :type C: Adaptor2d_Curve2d :param Abscissa: :type Abscissa: float :param U0: :type U0: float :param Ui: :type Ui: float :param Tol: :type Tol: float :rtype: None
-
IsDone
()¶ - True if the computation was successful, False otherwise. IsDone is a protection against: - non-convergence of the algorithm - querying the results before computation.
- 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>.
- 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>.
- 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> 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> with the given tolerance. Constructs an empty algorithm. This function is used only for initializing a framework to compute the length of a curve (or a series of curves). Warning The function IsDone will return the value false after the use of this function.
- 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 on the curve of the point solution of this algorithm. Exceptions StdFail_NotDone if the computation was not successful, or was not done.
- rtype
float
-
property
thisown
¶ The membership flag
-
class
GCPnts_DistFunction2dMV
(*args)¶ Bases:
OCC.Core.math.math_MultipleVarFunction
- Parameters
theCurvLinDist –
- type theCurvLinDist
GCPnts_DistFunction2d
- rtype
None
-
property
thisown
¶ The membership flag
-
class
GCPnts_DistFunctionMV
(*args)¶ Bases:
OCC.Core.math.math_MultipleVarFunction
- Parameters
theCurvLinDist –
- type theCurvLinDist
GCPnts_DistFunction
- rtype
None
-
property
thisown
¶ The membership flag
-
class
GCPnts_QuasiUniformAbscissa
(*args)¶ Bases:
object
- Constructs an empty algorithm. To define the problem to be solved, use the function Initialize.
- rtype
None* Computes a uniform abscissa distribution of points - on the curve C where Abscissa is the curvilinear distance between two consecutive points of the distribution.
- param C
- type C
Adaptor3d_Curve
- param NbPoints
- type NbPoints
int
- rtype
None* Computes a uniform abscissa distribution of points on the part of curve C limited by the two parameter values U1 and U2, where Abscissa is the curvilinear distance between two consecutive points of the distribution. The first point of the distribution is either the origin of curve C or the point of parameter U1. The following points are computed such that the curvilinear distance between two consecutive points is equal to Abscissa. The last point of the distribution is either the end point of curve C or the point of parameter U2. However the curvilinear distance between this last point and the point just preceding it in the distribution is, of course, generally not equal to Abscissa. Use the function IsDone to verify that the computation was successful, the function NbPoints to obtain the number of points of the computed distribution, and the function Parameter to read the parameter of each point. Warning The roles of U1 and U2 are inverted if U1 > U2 . Warning C is an adapted curve, that is, an object which is an interface between: - the services provided by either a 2D curve from the package Geom2d (in the case of an Adaptor2d_Curve2d curve) or a 3D curve from the package Geom (in the case of an Adaptor3d_Curve curve), - and those required on the curve by the computation algorithm.
- param C
- type C
Adaptor3d_Curve
- param NbPoints
- type NbPoints
int
- param U1
- type U1
float
- param U2
- type U2
float
- rtype
None* Computes a uniform abscissa distribution of points on the Curve2d <C>. <NbPoints> defines the nomber of desired points.
- param C
- type C
Adaptor2d_Curve2d
- param NbPoints
- type NbPoints
int
- rtype
None* Computes a Uniform abscissa distribution of points on a part of the Curve2d <C>.
- param C
- type C
Adaptor2d_Curve2d
- param NbPoints
- type NbPoints
int
- param U1
- type U1
float
- param U2
- type U2
float
- rtype
None
-
Initialize
()¶ - Initialize the algoritms with <C>, <NbPoints> and
- param C
- type C
Adaptor3d_Curve
- param NbPoints
- type NbPoints
int
- rtype
None* Initialize the algoritms with <C>, <Abscissa>, <U1>, <U2>.
- param C
- type C
Adaptor3d_Curve
- param NbPoints
- type NbPoints
int
- param U1
- type U1
float
- param U2
- type U2
float
- rtype
None* Initialize the algoritms with <C>, <NbPoints> and
- param C
- type C
Adaptor2d_Curve2d
- param NbPoints
- type NbPoints
int
- rtype
None* Initialize the algoritms with <C>, <Abscissa>, <U1>, <U2>.
- param C
- type C
Adaptor2d_Curve2d
- param NbPoints
- type NbPoints
int
- param U1
- type U1
float
- param U2
- type U2
float
- rtype
None
-
IsDone
()¶ - Returns true if the computation was successful. IsDone is a protection against: - non-convergence of the algorithm - querying the results before computation.
- rtype
bool
-
NbPoints
()¶ - Returns the number of points of the distribution computed by this algorithm. This value is either: - the one imposed on the algorithm at the time of construction (or initialization), or - the one computed by the algorithm when the curvilinear distance between two consecutive points of the distribution is imposed on the algorithm at the time of construction (or initialization). Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.
- rtype
int
-
Parameter
()¶ - Returns the parameter of the point of index Index in the distribution computed by this algorithm. Warning Index must be greater than or equal to 1, and less than or equal to the number of points of the distribution. However, pay particular attention as this condition is not checked by this function. Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.
- param Index
- type Index
int
- rtype
float
-
property
thisown
¶ The membership flag
-
class
GCPnts_QuasiUniformDeflection
(*args)¶ Bases:
object
- Constructs an empty algorithm. To define the problem to be solved, use the function Initialize.
- rtype
None* Computes a QuasiUniform Deflection distribution of points on the Curve <C>.
- param C
- type C
Adaptor3d_Curve
- param Deflection
- type Deflection
float
- param Continuity
default value is GeomAbs_C1
- type Continuity
GeomAbs_Shape
- rtype
None* Computes a QuasiUniform Deflection distribution of points on the Curve <C>.
- param C
- type C
Adaptor2d_Curve2d
- param Deflection
- type Deflection
float
- param Continuity
default value is GeomAbs_C1
- type Continuity
GeomAbs_Shape
- rtype
None* Computes a QuasiUniform Deflection distribution of points on a part of the Curve <C>.
- param C
- type C
Adaptor3d_Curve
- param Deflection
- type Deflection
float
- param U1
- type U1
float
- param U2
- type U2
float
- param Continuity
default value is GeomAbs_C1
- type Continuity
GeomAbs_Shape
- rtype
None* Computes a QuasiUniform Deflection distribution of points on a part of the Curve <C>. This and the above algorithms compute a distribution of points: - on the curve C, or - on the part of curve C limited by the two parameter values U1 and U2, where the deflection resulting from the distributed points is not greater than Deflection. The first point of the distribution is either the origin of curve C or the point of parameter U1. The last point of the distribution is either the end point of curve C or the point of parameter U2. Intermediate points of the distribution are built such that the deflection is not greater than Deflection. Using the following evaluation of the deflection: if Pi and Pj are two consecutive points of the distribution, respectively of parameter ui and uj on the curve, the deflection is the distance between: - the mid-point of Pi and Pj (the center of the chord joining these two points) - and the point of mid-parameter of these two points (the point of parameter [(ui+uj) / 2 ] on curve C). Continuity, defaulted to GeomAbs_C1, gives the degree of continuity of the curve C. (Note that C is an Adaptor3d_Curve or an Adaptor2d_Curve2d object, and does not know the degree of continuity of the underlying curve). Use the function IsDone to verify that the computation was successful, the function NbPoints to obtain the number of points of the computed distribution, and the function Parameter to read the parameter of each point. Warning - The roles of U1 and U2 are inverted if U1 > U2. - Derivative functions on the curve are called according to Continuity. An error may occur if Continuity is greater than the real degree of continuity of the curve. Warning C is an adapted curve, i.e. an object which is an interface between: - the services provided by either a 2D curve from the package Geom2d (in the case of an Adaptor2d_Curve2d curve) or a 3D curve from the package Geom (in the case of an Adaptor3d_Curve curve), - and those required on the curve by the computation algorithm.
- param C
- type C
Adaptor2d_Curve2d
- param Deflection
- type Deflection
float
- param U1
- type U1
float
- param U2
- type U2
float
- param Continuity
default value is GeomAbs_C1
- type Continuity
GeomAbs_Shape
- rtype
None
-
Deflection
()¶ - Returns the deflection between the curve and the polygon resulting from the points of the distribution computed by this algorithm. This is the value given to the algorithm at the time of construction (or initialization). Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.
- rtype
float
-
Initialize
()¶ - Initialize the algoritms with <C>, <Deflection>
- param C
- type C
Adaptor3d_Curve
- param Deflection
- type Deflection
float
- param Continuity
default value is GeomAbs_C1
- type Continuity
GeomAbs_Shape
- rtype
None* Initialize the algoritms with <C>, <Deflection>
- param C
- type C
Adaptor2d_Curve2d
- param Deflection
- type Deflection
float
- param Continuity
default value is GeomAbs_C1
- type Continuity
GeomAbs_Shape
- rtype
None* Initialize the algoritms with <C>, <Deflection>, <U1>,<U2>
- param C
- type C
Adaptor3d_Curve
- param Deflection
- type Deflection
float
- param U1
- type U1
float
- param U2
- type U2
float
- param Continuity
default value is GeomAbs_C1
- type Continuity
GeomAbs_Shape
- rtype
None* Initialize the algoritms with <C>, <Deflection>, – <U1>,<U2> This and the above algorithms initialize (or reinitialize) this algorithm and compute a distribution of points: - on the curve C, or - on the part of curve C limited by the two parameter values U1 and U2, where the deflection resulting from the distributed points is not greater than Deflection. The first point of the distribution is either the origin of curve C or the point of parameter U1. The last point of the distribution is either the end point of curve C or the point of parameter U2. Intermediate points of the distribution are built in such a way that the deflection is not greater than Deflection. Using the following evaluation of the deflection: if Pi and Pj are two consecutive points of the distribution, respectively of parameter ui and uj on the curve, the deflection is the distance between: - the mid-point of Pi and Pj (the center of the chord joining these two points) - and the point of mid-parameter of these two points (the point of parameter [(ui+uj) / 2 ] on curve C). Continuity, defaulted to GeomAbs_C1, gives the degree of continuity of the curve C. (Note that C is an Adaptor3d_Curve or an Adaptor2d_Curve2d object, and does not know the degree of continuity of the underlying curve). Use the function IsDone to verify that the computation was successful, the function NbPoints to obtain the number of points of the computed distribution, and the function Parameter to read the parameter of each point. Warning - The roles of U1 and U2 are inverted if U1 > U2. - Derivative functions on the curve are called according to Continuity. An error may occur if Continuity is greater than the real degree of continuity of the curve. Warning C is an adapted curve, i.e. an object which is an interface between: - the services provided by either a 2D curve from the package Geom2d (in the case of an Adaptor2d_Curve2d curve) or a 3D curve from the package Geom (in the case of an Adaptor3d_Curve curve), and those required on the curve by the computation algorithm.
- param C
- type C
Adaptor2d_Curve2d
- param Deflection
- type Deflection
float
- param U1
- type U1
float
- param U2
- type U2
float
- param Continuity
default value is GeomAbs_C1
- type Continuity
GeomAbs_Shape
- rtype
None
-
IsDone
()¶ - Returns true if the computation was successful. IsDone is a protection against: - non-convergence of the algorithm - querying the results before computation.
- rtype
bool
-
NbPoints
()¶ - Returns the number of points of the distribution computed by this algorithm. Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.
- rtype
int
-
Parameter
()¶ - Returns the parameter of the point of index Index in the distribution computed by this algorithm. Warning Index must be greater than or equal to 1, and less than or equal to the number of points of the distribution. However, pay particular attention as this condition is not checked by this function. Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.
- param Index
- type Index
int
- rtype
float
-
Value
()¶ - Returns the point of index Index in the distribution computed by this algorithm. Warning Index must be greater than or equal to 1, and less than or equal to the number of points of the distribution. However, pay particular attention as this condition is not checked by this function. Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.
- param Index
- type Index
int
- rtype
gp_Pnt
-
property
thisown
¶ The membership flag
-
class
GCPnts_TangentialDeflection
(*args)¶ Bases:
object
- Return type
None:param C: :type C: Adaptor3d_Curve :param AngularDeflection: :type AngularDeflection: float :param CurvatureDeflection: :type CurvatureDeflection: float :param MinimumOfPoints: default value is 2 :type MinimumOfPoints: int :param UTol: default value is 1.0e-9 :type UTol: float :param theMinLen: default value is 1.0e-7 :type theMinLen: float :rtype: None:param C: :type C: Adaptor3d_Curve :param FirstParameter: :type FirstParameter: float :param LastParameter: :type LastParameter: float :param AngularDeflection: :type AngularDeflection: float :param CurvatureDeflection: :type CurvatureDeflection: float :param MinimumOfPoints: default value is 2 :type MinimumOfPoints: int :param UTol: default value is 1.0e-9 :type UTol: float :param theMinLen: default value is 1.0e-7 :type theMinLen: float :rtype: None:param C: :type C: Adaptor2d_Curve2d :param AngularDeflection: :type AngularDeflection: float :param CurvatureDeflection: :type CurvatureDeflection: float :param MinimumOfPoints: default value is 2 :type MinimumOfPoints: int :param UTol: default value is 1.0e-9 :type UTol: float :param theMinLen: default value is 1.0e-7 :type theMinLen: float :rtype: None:param C: :type C: Adaptor2d_Curve2d :param FirstParameter: :type FirstParameter: float :param LastParameter: :type LastParameter: float :param AngularDeflection: :type AngularDeflection: float :param CurvatureDeflection: :type CurvatureDeflection: float :param MinimumOfPoints: default value is 2 :type MinimumOfPoints: int :param UTol: default value is 1.0e-9 :type UTol: float :param theMinLen: default value is 1.0e-7 :type theMinLen: float :rtype: None
-
AddPoint
()¶ - Add point to already calculated points (or replace existing) Returns index of new added point or founded with parametric tolerance (replaced if theIsReplace is true)
- param thePnt
- type thePnt
gp_Pnt
- param theParam
- type theParam
float
- param theIsReplace
default value is Standard_True
- type theIsReplace
bool
- rtype
int
-
static
ArcAngularStep
()¶ - Computes angular step for the arc using the given parameters.
- param theRadius
- type theRadius
float
- param theLinearDeflection
- type theLinearDeflection
float
- param theAngularDeflection
- type theAngularDeflection
float
- param theMinLength
- type theMinLength
float
- rtype
float
-
Initialize
()¶ - Parameters
C –
- type C
Adaptor3d_Curve
- param AngularDeflection
- type AngularDeflection
float
- param CurvatureDeflection
- type CurvatureDeflection
float
- param MinimumOfPoints
default value is 2
- type MinimumOfPoints
int
- param UTol
default value is 1.0e-9
- type UTol
float
- param theMinLen
default value is 1.0e-7
- type theMinLen
float
- rtype
None:param C:
- type C
Adaptor3d_Curve
- param FirstParameter
- type FirstParameter
float
- param LastParameter
- type LastParameter
float
- param AngularDeflection
- type AngularDeflection
float
- param CurvatureDeflection
- type CurvatureDeflection
float
- param MinimumOfPoints
default value is 2
- type MinimumOfPoints
int
- param UTol
default value is 1.0e-9
- type UTol
float
- param theMinLen
default value is 1.0e-7
- type theMinLen
float
- rtype
None:param C:
- type C
Adaptor2d_Curve2d
- param AngularDeflection
- type AngularDeflection
float
- param CurvatureDeflection
- type CurvatureDeflection
float
- param MinimumOfPoints
default value is 2
- type MinimumOfPoints
int
- param UTol
default value is 1.0e-9
- type UTol
float
- param theMinLen
default value is 1.0e-7
- type theMinLen
float
- rtype
None:param C:
- type C
Adaptor2d_Curve2d
- param FirstParameter
- type FirstParameter
float
- param LastParameter
- type LastParameter
float
- param AngularDeflection
- type AngularDeflection
float
- param CurvatureDeflection
- type CurvatureDeflection
float
- param MinimumOfPoints
default value is 2
- type MinimumOfPoints
int
- param UTol
default value is 1.0e-9
- type UTol
float
- param theMinLen
default value is 1.0e-7
- type theMinLen
float
- rtype
None
-
Parameter
()¶ - Parameters
I –
- type I
int
- rtype
float
-
Value
()¶ - Parameters
I –
- type I
int
- rtype
gp_Pnt
-
property
thisown
¶ The membership flag
-
class
GCPnts_UniformAbscissa
(*args)¶ Bases:
object
- creation of a indefinite UniformAbscissa
- rtype
None* Computes a uniform abscissa distribution of points on the Curve <C>. Parameter Toler is equal Precision::Confusion by default. It Is used for more precise calculation of curve length
- param C
- type C
Adaptor3d_Curve
- param Abscissa
- type Abscissa
float
- param Toler
default value is -1
- type Toler
float
- rtype
None* Computes a Uniform abscissa distribution of points on a part of the Curve <C>. Parameter Toler is equal Precision::Confusion by default. It Is used for more precise calculation of curve length
- param C
- type C
Adaptor3d_Curve
- param Abscissa
- type Abscissa
float
- param U1
- type U1
float
- param U2
- type U2
float
- param Toler
default value is -1
- type Toler
float
- rtype
None* Computes a uniform abscissa distribution of points on the Curve <C>. <NbPoints> defines the nomber of desired points. Parameter Toler is equal Precision::Confusion by default. It Is used for more precise calculation of curve length
- param C
- type C
Adaptor3d_Curve
- param NbPoints
- type NbPoints
int
- param Toler
default value is -1
- type Toler
float
- rtype
None* Computes a Uniform abscissa distribution of points on a part of the Curve <C>. Parameter Toler is equal Precision::Confusion by default. It Is used for more precise calculation of curve length
- param C
- type C
Adaptor3d_Curve
- param NbPoints
- type NbPoints
int
- param U1
- type U1
float
- param U2
- type U2
float
- param Toler
default value is -1
- type Toler
float
- rtype
None* Computes a uniform abscissa distribution of points on the Curve2d <C>. Parameter Toler is equal Precision::Confusion by default. It Is used for more precise calculation of curve length
- param C
- type C
Adaptor2d_Curve2d
- param Abscissa
- type Abscissa
float
- param Toler
default value is -1
- type Toler
float
- rtype
None* Computes a Uniform abscissa distribution of points on a part of the Curve2d <C>. Parameter Toler is equal Precision::Confusion by default. It Is used for more precise calculation of curve length
- param C
- type C
Adaptor2d_Curve2d
- param Abscissa
- type Abscissa
float
- param U1
- type U1
float
- param U2
- type U2
float
- param Toler
default value is -1
- type Toler
float
- rtype
None* Computes a uniform abscissa distribution of points on the Curve2d <C>. <NbPoints> defines the nomber of desired points. Parameter Toler is equal Precision::Confusion by default. It Is used for more precise calculation of curve length
- param C
- type C
Adaptor2d_Curve2d
- param NbPoints
- type NbPoints
int
- param Toler
default value is -1
- type Toler
float
- rtype
None* Computes a Uniform abscissa distribution of points on a part of the Curve2d <C>. Parameter Toler is equal Precision::Confusion by default. It Is used for more precise calculation of curve length
- param C
- type C
Adaptor2d_Curve2d
- param NbPoints
- type NbPoints
int
- param U1
- type U1
float
- param U2
- type U2
float
- param Toler
default value is -1
- type Toler
float
- rtype
None
-
Abscissa
()¶ - returne the current abscissa ie the distance between two consecutive points
- rtype
float
-
Initialize
()¶ - Initialize the algoritms with <C>, <Abscissa>, <Toler>
- param C
- type C
Adaptor3d_Curve
- param Abscissa
- type Abscissa
float
- param Toler
default value is -1
- type Toler
float
- rtype
None* Initialize the algoritms with <C>, <Abscissa>, <U1>, <U2>, <Toler>
- param C
- type C
Adaptor3d_Curve
- param Abscissa
- type Abscissa
float
- param U1
- type U1
float
- param U2
- type U2
float
- param Toler
default value is -1
- type Toler
float
- rtype
None* Initialize the algoritms with <C>, <NbPoints>, <Toler> and
- param C
- type C
Adaptor3d_Curve
- param NbPoints
- type NbPoints
int
- param Toler
default value is -1
- type Toler
float
- rtype
None* Initialize the algoritms with <C>, <Abscissa>, <U1>, <U2>, <Toler>.
- param C
- type C
Adaptor3d_Curve
- param NbPoints
- type NbPoints
int
- param U1
- type U1
float
- param U2
- type U2
float
- param Toler
default value is -1
- type Toler
float
- rtype
None* Initialize the algoritms with <C>, <Abscissa>, <Toler>
- param C
- type C
Adaptor2d_Curve2d
- param Abscissa
- type Abscissa
float
- param Toler
default value is -1
- type Toler
float
- rtype
None* Initialize the algoritms with <C>, <Abscissa>, <U1>, <U2>, <Toler>
- param C
- type C
Adaptor2d_Curve2d
- param Abscissa
- type Abscissa
float
- param U1
- type U1
float
- param U2
- type U2
float
- param Toler
default value is -1
- type Toler
float
- rtype
None* Initialize the algoritms with <C>, <NbPoints>, <Toler> and
- param C
- type C
Adaptor2d_Curve2d
- param NbPoints
- type NbPoints
int
- param Toler
default value is -1
- type Toler
float
- rtype
None* Initialize the algoritms with <C>, <Abscissa>, <U1>, <U2>, <Toler>.
- param C
- type C
Adaptor2d_Curve2d
- param NbPoints
- type NbPoints
int
- param U1
- type U1
float
- param U2
- type U2
float
- param Toler
default value is -1
- type Toler
float
- rtype
None
-
Parameter
()¶ - returns the computed Parameter of index <Index>.
- param Index
- type Index
int
- rtype
float
-
property
thisown
¶ The membership flag
-
class
GCPnts_UniformDeflection
(*args)¶ Bases:
object
- Constructs an empty algorithm. To define the problem to be solved, use the function Initialize.
- rtype
None* Computes a uniform Deflection distribution of points on the Curve <C>. if <WithControl> is True,the algorithm controls the estimate deflection
- param C
- type C
Adaptor3d_Curve
- param Deflection
- type Deflection
float
- param WithControl
default value is Standard_True
- type WithControl
bool
- rtype
None* Computes a uniform Deflection distribution of points on the Curve <C>. if <WithControl> is True,the algorithm controls the estimate deflection
- param C
- type C
Adaptor2d_Curve2d
- param Deflection
- type Deflection
float
- param WithControl
default value is Standard_True
- type WithControl
bool
- rtype
None* Computes a Uniform Deflection distribution of points on a part of the Curve <C>. if <WithControl> is True,the algorithm controls the estimate deflection
- param C
- type C
Adaptor3d_Curve
- param Deflection
- type Deflection
float
- param U1
- type U1
float
- param U2
- type U2
float
- param WithControl
default value is Standard_True
- type WithControl
bool
- rtype
None* Computes a Uniform Deflection distribution of points on a part of the Curve <C>. if <WithControl> is True,the algorithm controls the estimate deflection
- param C
- type C
Adaptor2d_Curve2d
- param Deflection
- type Deflection
float
- param U1
- type U1
float
- param U2
- type U2
float
- param WithControl
default value is Standard_True
- type WithControl
bool
- rtype
None
-
Deflection
()¶ - Returns the deflection between the curve and the polygon resulting from the points of the distribution computed by this algorithm. This value is the one given to the algorithm at the time of construction (or initialization). Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.
- rtype
float
-
Initialize
()¶ - Initialize the algoritms with <C>, <Deflection>
- param C
- type C
Adaptor3d_Curve
- param Deflection
- type Deflection
float
- param WithControl
default value is Standard_True
- type WithControl
bool
- rtype
None* Initialize the algoritms with <C>, <Deflection>
- param C
- type C
Adaptor2d_Curve2d
- param Deflection
- type Deflection
float
- param WithControl
default value is Standard_True
- type WithControl
bool
- rtype
None* Initialize the algoritms with <C>, <Deflection>, <U1>,<U2>
- param C
- type C
Adaptor3d_Curve
- param Deflection
- type Deflection
float
- param U1
- type U1
float
- param U2
- type U2
float
- param WithControl
default value is Standard_True
- type WithControl
bool
- rtype
None* Initialize the algoritms with <C>, <Deflection>, <U1>,<U2> This and the above methods initialize (or reinitialize) this algorithm and compute a distribution of points: - on the curve C, or - on the part of curve C limited by the two parameter values U1 and U2, where the maximum distance between C and the polygon that results from the points of the distribution is not greater than Deflection. The first point of the distribution is either the origin of curve C or the point of parameter U1. The last point of the distribution is either the end point of curve C or the point of parameter U2. Intermediate points of the distribution are built using interpolations of segments of the curve limited at the 2nd degree. The construction ensures, in a first step, that the chordal deviation for this interpolation of the curve is less than or equal to Deflection. However, it does not ensure that the chordal deviation for the curve itself is less than or equal to Deflection. To do this a check is necessary, which may generate (second step) additional intermediate points. This check is time consuming, and can be avoided by setting WithControl to false. Note that by default WithControl is true and check is performed. Use the function IsDone to verify that the computation was successful, the function NbPoints to obtain the number of points of the computed distribution, and the function Parameter to read the parameter of each point. Warning - C is necessary, ‘C2’ continuous. This property is not checked at construction time. - The roles of U1 and U2 are inverted if U1 > U2. Warning C is an adapted curve, i.e. an object which is an interface between: - the services provided by either a 2D curve from the package Geom2d (in the case of an Adaptor2d_Curve2d curve) or a 3D curve from the package Geom (in the case of an Adaptor3d_Curve curve), - and those required on the curve by the computation algorithm.
- param C
- type C
Adaptor2d_Curve2d
- param Deflection
- type Deflection
float
- param U1
- type U1
float
- param U2
- type U2
float
- param WithControl
default value is Standard_True
- type WithControl
bool
- rtype
None
-
IsDone
()¶ - Returns true if the computation was successful. IsDone is a protection against: - non-convergence of the algorithm - querying the results before computation.
- rtype
bool
-
NbPoints
()¶ - Returns the number of points of the distribution computed by this algorithm. Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.
- rtype
int
-
Parameter
()¶ - Returns the parameter of the point of index Index in the distribution computed by this algorithm. Warning Index must be greater than or equal to 1, and less than or equal to the number of points of the distribution. However, pay particular attention as this condition is not checked by this function. Exceptions StdFail_NotDone if this algorithm has not been initialized, or if the computation was not successful.
- param Index
- type Index
int
- rtype
float
-
Value
()¶ - Returns the point of index Index in the distribution computed by this algorithm. Warning Index must be greater than or equal to 1, and less than or equal to the number of points of the distribution. However, pay particular attention as this condition is not checked by this function. Exceptions StdFAil_NotDone if this algorithm has not been initialized, or if the computation was not successful.
- param Index
- type Index
int
- rtype
gp_Pnt
-
property
thisown
¶ The membership flag