OCC.Core.Law module¶
Law module, see official documentation at https://www.opencascade.com/doc/occt-7.4.0/refman/html/package_law.html
-
class
Law_BSpFunc
(*args)¶ Bases:
OCC.Core.Law.Law_Function
- Return type
None:param C: :type C: Law_BSpline :param First: :type First: float :param Last: :type Last: float :rtype: None
-
Curve
()¶ - Return type
opencascade::handle<Law_BSpline>
-
static
DownCast
(t)¶
-
SetCurve
()¶ - Parameters
C –
- type C
Law_BSpline
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Law_BSpline
(*args)¶ Bases:
OCC.Core.Standard.Standard_Transient
- Creates a non-rational B_spline curve on the basis <Knots, Multiplicities> of degree <Degree>.
- param Poles
- type Poles
TColStd_Array1OfReal
- param Knots
- type Knots
TColStd_Array1OfReal
- param Multiplicities
- type Multiplicities
TColStd_Array1OfInteger
- param Degree
- type Degree
int
- param Periodic
default value is Standard_False
- type Periodic
bool
- rtype
None* Creates a rational B_spline curve on the basis <Knots, Multiplicities> of degree <Degree>.
- param Poles
- type Poles
TColStd_Array1OfReal
- param Weights
- type Weights
TColStd_Array1OfReal
- param Knots
- type Knots
TColStd_Array1OfReal
- param Multiplicities
- type Multiplicities
TColStd_Array1OfInteger
- param Degree
- type Degree
int
- param Periodic
default value is Standard_False
- type Periodic
bool
- rtype
None
-
Continuity
()¶ - Returns the global continuity of the curveC0only geometric continuity, C1continuity of the first derivative all along the Curve, C2continuity of the second derivative all along the Curve, C3continuity of the third derivative all along the Curve, CNthe order of continuity is infinite. For a B-spline curve of degree d if a knot Ui has a multiplicity p the B-spline curve is only Cd-p continuous at Ui. So the global continuity of the curve can’t be greater than Cd-p where p is the maximum multiplicity of the interior Knots. In the interior of a knot span the curve is infinitely continuously differentiable.
- rtype
GeomAbs_Shape
-
Copy
()¶ - Return type
opencascade::handle<Law_BSpline>
-
D0
()¶ - Parameters
U –
- type U
float
- param P
- type P
float
- rtype
None
-
D1
()¶ - Parameters
U –
- type U
float
- param P
- type P
float
- param V1
- type V1
float
- rtype
None
-
D2
()¶ - Parameters
U –
- type U
float
- param P
- type P
float
- param V1
- type V1
float
- param V2
- type V2
float
- rtype
None
-
D3
()¶ - Parameters
U –
- type U
float
- param P
- type P
float
- param V1
- type V1
float
- param V2
- type V2
float
- param V3
- type V3
float
- rtype
None
-
DN
()¶ - The following functions computes the point of parameter U and the derivatives at this point on the B-spline curve arc defined between the knot FromK1 and the knot ToK2. U can be out of bounds [Knot (FromK1), Knot (ToK2)] but for the computation we only use the definition of the curve between these two knots. This method is useful to compute local derivative, if the order of continuity of the whole curve is not greater enough. Inside the parametric domain Knot (FromK1), Knot (ToK2) the evaluations are the same as if we consider the whole definition of the curve. Of course the evaluations are different outside this parametric domain.
- param U
- type U
float
- param N
- type N
int
- rtype
float
-
Degree
()¶ - Computation of value and derivatives
- rtype
int
-
static
DownCast
(t)¶
-
EndPoint
()¶ - Returns the last point of the curve. WarningsThe last point of the curve is different from the last pole of the curve if the multiplicity of the last knot is lower than Degree.
- rtype
float
-
FirstParameter
()¶ - Computes the parametric value of the start point of the curve. It is a knot value.
- rtype
float
-
FirstUKnotIndex
()¶ - For a B-spline curve the first parameter (which gives the start point of the curve) is a knot value but if the multiplicity of the first knot index is lower than Degree + 1 it is not the first knot of the curve. This method computes the index of the knot corresponding to the first parameter.
- rtype
int
-
IncreaseDegree
()¶ - Increase the degree to <Degree>. Nothing is done if <Degree> is lower or equal to the current degree.
- param Degree
- type Degree
int
- rtype
None
-
IncreaseMultiplicity
()¶ - Increases the multiplicity of the knot <Index> to <M>. //! If <M> is lower or equal to the current multiplicity nothing is done. If <M> is higher than the degree the degree is used. If <Index> is not in [FirstUKnotIndex, LastUKnotIndex]
- param Index
- type Index
int
- param M
- type M
int
- rtype
None* Increases the multiplicities of the knots in [I1,I2] to <M>. //! For each knot if <M> is lower or equal to the current multiplicity nothing is done. If <M> is higher than the degree the degree is used. If <I1,I2> are not in [FirstUKnotIndex, LastUKnotIndex]
- param I1
- type I1
int
- param I2
- type I2
int
- param M
- type M
int
- rtype
None
-
IncrementMultiplicity
()¶ - Increment the multiplicities of the knots in [I1,I2] by <M>. //! If <M> is not positive nithing is done. //! For each knot the resulting multiplicity is limited to the Degree. If <I1,I2> are not in [FirstUKnotIndex, LastUKnotIndex]
- param I1
- type I1
int
- param I2
- type I2
int
- param M
- type M
int
- rtype
None
-
InsertKnot
()¶ - Inserts a knot value in the sequence of knots. If <U> is an existing knot the multiplicity is increased by <M>. //! If U is not on the parameter range nothing is done. //! If the multiplicity is negative or null nothing is done. The new multiplicity is limited to the degree. //! The tolerance criterion for knots equality is the max of Epsilon(U) and ParametricTolerance.
- param U
- type U
float
- param M
default value is 1
- type M
int
- param ParametricTolerance
default value is 0.0
- type ParametricTolerance
float
- param Add
default value is Standard_True
- type Add
bool
- rtype
None
-
InsertKnots
()¶ - Inserts a set of knots values in the sequence of knots. //! For each U = Knots(i), M = Mults(i) //! If <U> is an existing knot the multiplicity is increased by <M> if <Add> is True, increased to <M> if <Add> is False. //! If U is not on the parameter range nothing is done. //! If the multiplicity is negative or null nothing is done. The new multiplicity is limited to the degree. //! The tolerance criterion for knots equality is the max of Epsilon(U) and ParametricTolerance.
- param Knots
- type Knots
TColStd_Array1OfReal
- param Mults
- type Mults
TColStd_Array1OfInteger
- param ParametricTolerance
default value is 0.0
- type ParametricTolerance
float
- param Add
default value is Standard_False
- type Add
bool
- rtype
None
-
IsCN
()¶ - Returns the continuity of the curve, the curve is at least C0. Raised if N < 0.
- param N
- type N
int
- rtype
bool
-
IsClosed
()¶ - Returns true if the distance between the first point and the last point of the curve is lower or equal to Resolution from package gp. WarningsThe first and the last point can be different from the first pole and the last pole of the curve.
- rtype
bool
-
IsPeriodic
()¶ - Returns True if the curve is periodic.
- rtype
bool
-
IsRational
()¶ - Returns True if the weights are not identical. The tolerance criterion is Epsilon of the class Real.
- rtype
bool
-
Knot
()¶ - Returns the knot of range Index. When there is a knot with a multiplicity greater than 1 the knot is not repeated. The method Multiplicity can be used to get the multiplicity of the Knot. Raised if Index < 1 or Index > NbKnots
- param Index
- type Index
int
- rtype
float
-
KnotDistribution
()¶ - Returns NonUniform or Uniform or QuasiUniform or PiecewiseBezier. If all the knots differ by a positive constant from the preceding knot the BSpline Curve can be- Uniform if all the knots are of multiplicity 1, - QuasiUniform if all the knots are of multiplicity 1 except for the first and last knot which are of multiplicity Degree + 1, - PiecewiseBezier if the first and last knots have multiplicity Degree + 1 and if interior knots have multiplicity Degree A piecewise Bezier with only two knots is a BezierCurve. else the curve is non uniform. The tolerance criterion is Epsilon from class Real.
- rtype
GeomAbs_BSplKnotDistribution
-
KnotSequence
()¶ - Returns the knots sequence. In this sequence the knots with a multiplicity greater than 1 are repeated. ExampleK = {k1, k1, k1, k2, k3, k3, k4, k4, k4} //! Raised if the length of K is not equal to NbPoles + Degree + 1
- param K
- type K
TColStd_Array1OfReal
- rtype
None
-
Knots
()¶ - returns the knot values of the B-spline curve; //! Raised if the length of K is not equal to the number of knots.
- param K
- type K
TColStd_Array1OfReal
- rtype
None
-
LastParameter
()¶ - Computes the parametric value of the end point of the curve. It is a knot value.
- rtype
float
-
LastUKnotIndex
()¶ - For a BSpline curve the last parameter (which gives the end point of the curve) is a knot value but if the multiplicity of the last knot index is lower than Degree + 1 it is not the last knot of the curve. This method computes the index of the knot corresponding to the last parameter.
- rtype
int
-
LocalD0
()¶ - Parameters
U –
- type U
float
- param FromK1
- type FromK1
int
- param ToK2
- type ToK2
int
- param P
- type P
float
- rtype
None
-
LocalD1
()¶ - Parameters
U –
- type U
float
- param FromK1
- type FromK1
int
- param ToK2
- type ToK2
int
- param P
- type P
float
- param V1
- type V1
float
- rtype
None
-
LocalD2
()¶ - Parameters
U –
- type U
float
- param FromK1
- type FromK1
int
- param ToK2
- type ToK2
int
- param P
- type P
float
- param V1
- type V1
float
- param V2
- type V2
float
- rtype
None
-
LocalD3
()¶ - Parameters
U –
- type U
float
- param FromK1
- type FromK1
int
- param ToK2
- type ToK2
int
- param P
- type P
float
- param V1
- type V1
float
- param V2
- type V2
float
- param V3
- type V3
float
- rtype
None
-
LocalDN
()¶ - Parameters
U –
- type U
float
- param FromK1
- type FromK1
int
- param ToK2
- type ToK2
int
- param N
- type N
int
- rtype
float
-
LocalValue
()¶ - Parameters
U –
- type U
float
- param FromK1
- type FromK1
int
- param ToK2
- type ToK2
int
- rtype
float
-
LocateU
()¶ - Locates the parametric value U in the sequence of knots. If ‘WithKnotRepetition’ is True we consider the knot’s representation with repetition of multiple knot value, otherwise we consider the knot’s representation with no repetition of multiple knot values. Knots (I1) <= U <= Knots (I2) . if I1 = I2 U is a knot value (the tolerance criterion ParametricTolerance is used). . if I1 < 1 => U < Knots (1) - Abs(ParametricTolerance) . if I2 > NbKnots => U > Knots (NbKnots) + Abs(ParametricTolerance)
- param U
- type U
float
- param ParametricTolerance
- type ParametricTolerance
float
- param I1
- type I1
int
- param I2
- type I2
int
- param WithKnotRepetition
default value is Standard_False
- type WithKnotRepetition
bool
- rtype
None
-
static
MaxDegree
()¶ - Returns the value of the maximum degree of the normalized B-spline basis functions in this package.
- rtype
int
-
MovePointAndTangent
()¶ - Changes the value of the Law at parameter U to NewValue. and makes its derivative at U be derivative. StartingCondition = -1 means first can move EndingCondition = -1 means last point can move StartingCondition = 0 means the first point cannot move EndingCondition = 0 means the last point cannot move StartingCondition = 1 means the first point and tangent cannot move EndingCondition = 1 means the last point and tangent cannot move and so forth ErrorStatus != 0 means that there are not enought degree of freedom with the constrain to deform the curve accordingly
- param U
- type U
float
- param NewValue
- type NewValue
float
- param Derivative
- type Derivative
float
- param Tolerance
- type Tolerance
float
- param StartingCondition
- type StartingCondition
int
- param EndingCondition
- type EndingCondition
int
- param ErrorStatus
- type ErrorStatus
int
- rtype
None
-
Multiplicities
()¶ - Returns the multiplicity of the knots of the curve. //! Raised if the length of M is not equal to NbKnots.
- param M
- type M
TColStd_Array1OfInteger
- rtype
None
-
Multiplicity
()¶ - Returns the multiplicity of the knots of range Index. Raised if Index < 1 or Index > NbKnots
- param Index
- type Index
int
- rtype
int
-
NbKnots
()¶ - Returns the number of knots. This method returns the number of knot without repetition of multiple knots.
- rtype
int
-
NbPoles
()¶ - Returns the number of poles
- rtype
int
-
PeriodicNormalization
()¶ - returns the parameter normalized within the period if the curve is periodicotherwise does not do anything
- param U
- type U
float
- rtype
None
-
Pole
()¶ - Returns the pole of range Index. Raised if Index < 1 or Index > NbPoles.
- param Index
- type Index
int
- rtype
float
-
Poles
()¶ - Returns the poles of the B-spline curve; //! Raised if the length of P is not equal to the number of poles.
- param P
- type P
TColStd_Array1OfReal
- rtype
None
-
RemoveKnot
()¶ - Decrement the knots multiplicity to <M>. If M is 0 the knot is removed. The Poles sequence is modified. //! As there are two ways to compute the new poles the average is computed if the distance is lower than the <Tolerance>, else False is returned. //! A low tolerance is used to prevent the modification of the curve. //! A high tolerance is used to ‘smooth’ the curve. //! Raised if Index is not in the range [FirstUKnotIndex, LastUKnotIndex] pole insertion and pole removing this operation is limited to the Uniform or QuasiUniform BSplineCurve. The knot values are modified . If the BSpline is NonUniform or Piecewise Bezier an exception Construction error is raised.
- param Index
- type Index
int
- param M
- type M
int
- param Tolerance
- type Tolerance
float
- rtype
bool
-
Resolution
()¶ - given Tolerance3D returns UTolerance such that if f(t) is the curve we have | t1 - t0| < Utolerance ===> |f(t1) - f(t0)| < Tolerance3D
- param Tolerance3D
- type Tolerance3D
float
- param UTolerance
- type UTolerance
float
- rtype
None
-
Reverse
()¶ - Changes the direction of parametrization of <self>. The Knot sequence is modified, the FirstParameter and the LastParameter are not modified. The StartPoint of the initial curve becomes the EndPoint of the reversed curve and the EndPoint of the initial curve becomes the StartPoint of the reversed curve.
- rtype
None
-
ReversedParameter
()¶ - Returns the parameter on the reversed curve for the point of parameter U on <self>. //! returns UFirst + ULast - U
- param U
- type U
float
- rtype
float
-
Segment
()¶ - Segments the curve between U1 and U2. The control points are modified, the first and the last point are not the same. WarningsEven if <self> is not closed it can become closed after the segmentation for example if U1 or U2 are out of the bounds of the curve <self> or if the curve makes loop. After the segmentation the length of a curve can be null. raises if U2 < U1.
- param U1
- type U1
float
- param U2
- type U2
float
- rtype
None
-
SetKnot
()¶ - Changes the knot of range Index. The multiplicity of the knot is not modified. Raised if K >= Knots(Index+1) or K <= Knots(Index-1). Raised if Index < 1 || Index > NbKnots
- param Index
- type Index
int
- param K
- type K
float
- rtype
None* Changes the knot of range Index with its multiplicity. You can increase the multiplicity of a knot but it is not allowed to decrease the multiplicity of an existing knot. //! Raised if K >= Knots(Index+1) or K <= Knots(Index-1). Raised if M is greater than Degree or lower than the previous multiplicity of knot of range Index. Raised if Index < 1 || Index > NbKnots
- param Index
- type Index
int
- param K
- type K
float
- param M
- type M
int
- rtype
None
-
SetKnots
()¶ - Changes all the knots of the curve The multiplicity of the knots are not modified. //! Raised if there is an index such that K (Index+1) <= K (Index). //! Raised if K.Lower() < 1 or K.Upper() > NbKnots
- param K
- type K
TColStd_Array1OfReal
- rtype
None
-
SetNotPeriodic
()¶ - Makes a non periodic curve. If the curve was non periodic the curve is not modified.
- rtype
None
-
SetOrigin
()¶ - Set the origin of a periodic curve at Knot(index) KnotVector and poles are modified. Raised if the curve is not periodic Raised if index not in the range [FirstUKnotIndex , LastUKnotIndex]
- param Index
- type Index
int
- rtype
None
-
SetPeriodic
()¶ - Makes a closed B-spline into a periodic curve. The curve is periodic if the knot sequence is periodic and if the curve is closed (The tolerance criterion is Resolution from gp). The period T is equal to Knot(LastUKnotIndex) - Knot(FirstUKnotIndex). A periodic B-spline can be uniform or not. Raised if the curve is not closed.
- rtype
None
-
SetPole
()¶ - Substitutes the Pole of range Index with P. //! Raised if Index < 1 || Index > NbPoles
- param Index
- type Index
int
- param P
- type P
float
- rtype
None* Substitutes the pole and the weight of range Index. If the curve <self> is not rational it can become rational If the curve was rational it can become non rational //! Raised if Index < 1 || Index > NbPoles Raised if Weight <= 0.0
- param Index
- type Index
int
- param P
- type P
float
- param Weight
- type Weight
float
- rtype
None
-
SetWeight
()¶ - Changes the weight for the pole of range Index. If the curve was non rational it can become rational. If the curve was rational it can become non rational. //! Raised if Index < 1 || Index > NbPoles Raised if Weight <= 0.0
- param Index
- type Index
int
- param Weight
- type Weight
float
- rtype
None
-
StartPoint
()¶ - Returns the start point of the curve. WarningsThis point is different from the first pole of the curve if the multiplicity of the first knot is lower than Degree.
- rtype
float
-
Value
()¶ - Parameters
U –
- type U
float
- rtype
float
-
Weight
()¶ - Returns the weight of the pole of range Index . Raised if Index < 1 or Index > NbPoles.
- param Index
- type Index
int
- rtype
float
-
Weights
()¶ - Returns the weights of the B-spline curve; //! Raised if the length of W is not equal to NbPoles.
- param W
- type W
TColStd_Array1OfReal
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Law_BSplineKnotSplitting
(*args)¶ Bases:
object
- Locates the knot values which correspond to the segmentation of the curve into arcs with a continuity equal to ContinuityRange. //! Raised if ContinuityRange is not greater or equal zero.
- param BasisLaw
- type BasisLaw
Law_BSpline
- param ContinuityRange
- type ContinuityRange
int
- rtype
None
-
NbSplits
()¶ - Returns the number of knots corresponding to the splitting.
- rtype
int
-
SplitValue
()¶ - Returns the index of the knot corresponding to the splitting of range Index. //! Raised if Index < 1 or Index > NbSplits
- param Index
- type Index
int
- rtype
int
-
Splitting
()¶ - Returns the indexes of the BSpline curve knots corresponding to the splitting. //! Raised if the length of SplitValues is not equal to NbSPlit.
- param SplitValues
- type SplitValues
TColStd_Array1OfInteger
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Law_Composite
(*args)¶ Bases:
OCC.Core.Law.Law_Function
- Construct an empty Law
- rtype
None* Construct an empty, trimed Law
- param First
- type First
float
- param Last
- type Last
float
- param Tol
- type Tol
float
- rtype
None
-
ChangeElementaryLaw
()¶ - Returns the elementary function of the composite used to compute at parameter W.
- param W
- type W
float
- rtype
opencascade::handle<Law_Function>
-
static
DownCast
(t)¶
-
property
thisown
¶ The membership flag
-
class
Law_Constant
(*args)¶ Bases:
OCC.Core.Law.Law_Function
- Return type
-
static
DownCast
(t)¶
-
Set
()¶ - Set the radius and the range of the constant Law.
- param Radius
- type Radius
float
- param PFirst
- type PFirst
float
- param PLast
- type PLast
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Law_Function
(*args, **kwargs)¶ Bases:
OCC.Core.Standard.Standard_Transient
Empty constructor
- Return type
None* Copy constructor – does nothing
- Parameters
& (Standard_Transient) –
- Return type
-
Bounds
()¶ - Returns the parametric bounds of the function.
- param PFirst
- type PFirst
float
- param PLast
- type PLast
float
- rtype
void
-
Continuity
()¶ - Return type
GeomAbs_Shape
-
D1
()¶ - Returns the value F and the first derivative D of the function at the point of parameter X.
- param X
- type X
float
- param F
- type F
float
- param D
- type D
float
- rtype
void
-
D2
()¶ - Returns the value, first and seconde derivatives at parameter X.
- param X
- type X
float
- param F
- type F
float
- param D
- type D
float
- param D2
- type D2
float
- rtype
void
-
static
DownCast
(t)¶
-
Intervals
()¶ - Stores in <T> the parameters bounding the intervals of continuity <S>. //! The array must provide enough room to accomodate for the parameters. i.e. T.Length() > NbIntervals()
- param T
- type T
TColStd_Array1OfReal
- param S
- type S
GeomAbs_Shape
- rtype
void
-
NbIntervals
()¶ - Returns the number of intervals for continuity <S>. May be one if Continuity(me) >= <S>
- param S
- type S
GeomAbs_Shape
- rtype
int
-
Trim
()¶ - Returns a law equivalent of <self> between parameters <First> and <Last>. <Tol> is used to test for 3d points confusion. It is usfule to determines the derivatives in these values <First> and <Last> if the Law is not Cn.
- param PFirst
- type PFirst
float
- param PLast
- type PLast
float
- param Tol
- type Tol
float
- rtype
opencascade::handle<Law_Function>
-
Value
()¶ - Returns the value of the function at the point of parameter X.
- param X
- type X
float
- rtype
float
-
property
thisown
¶ The membership flag
-
class
Law_Interpol
(*args)¶ Bases:
OCC.Core.Law.Law_BSpFunc
- Constructs an empty interpolative evolution law. The function Set is used to define the law.
- rtype
None
-
static
DownCast
(t)¶
-
Set
()¶ - Defines this evolution law by interpolating the set of 2D points ParAndRad. The Y coordinate of a point of ParAndRad is the value of the function at the parameter point given by its X coordinate. If Periodic is true, this function is assumed to be periodic. Warning - The X coordinates of points in the table ParAndRad must be given in ascendant order. - If Periodic is true, the first and last Y coordinates of points in the table ParAndRad are assumed to be equal. In addition, with the second syntax, Dd and Df are also assumed to be equal. If this is not the case, Set uses the first value(s) as last value(s).
- param ParAndRad
- type ParAndRad
TColgp_Array1OfPnt2d
- param Periodic
default value is Standard_False
- type Periodic
bool
- rtype
None* Defines this evolution law by interpolating the set of 2D points ParAndRad. The Y coordinate of a point of ParAndRad is the value of the function at the parameter point given by its X coordinate. If Periodic is true, this function is assumed to be periodic. In the second syntax, Dd and Df define the values of the first derivative of the function at its first and last points. Warning - The X coordinates of points in the table ParAndRad must be given in ascendant order. - If Periodic is true, the first and last Y coordinates of points in the table ParAndRad are assumed to be equal. In addition, with the second syntax, Dd and Df are also assumed to be equal. If this is not the case, Set uses the first value(s) as last value(s).
- param ParAndRad
- type ParAndRad
TColgp_Array1OfPnt2d
- param Dd
- type Dd
float
- param Df
- type Df
float
- param Periodic
default value is Standard_False
- type Periodic
bool
- rtype
None
-
SetInRelative
()¶ - Parameters
ParAndRad –
- type ParAndRad
TColgp_Array1OfPnt2d
- param Ud
- type Ud
float
- param Uf
- type Uf
float
- param Periodic
default value is Standard_False
- type Periodic
bool
- rtype
None:param ParAndRad:
- type ParAndRad
TColgp_Array1OfPnt2d
- param Ud
- type Ud
float
- param Uf
- type Uf
float
- param Dd
- type Dd
float
- param Df
- type Df
float
- param Periodic
default value is Standard_False
- type Periodic
bool
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Law_Interpolate
(*args)¶ Bases:
object
- Tolerance is to check if the points are not too close to one an other. It is also used to check if the tangent vector is not too small. There should be at least 2 points. If PeriodicFlag is True then the curve will be periodic be periodic
- param Points
- type Points
TColStd_HArray1OfReal
- param PeriodicFlag
- type PeriodicFlag
bool
- param Tolerance
- type Tolerance
float
- rtype
None* Tolerance is to check if the points are not too close to one an other. It is also used to check if the tangent vector is not too small. There should be at least 2 points. If PeriodicFlag is True then the curve will be periodic be periodic
- param Points
- type Points
TColStd_HArray1OfReal
- param Parameters
- type Parameters
TColStd_HArray1OfReal
- param PeriodicFlag
- type PeriodicFlag
bool
- param Tolerance
- type Tolerance
float
- rtype
None
-
Curve
()¶ - Return type
opencascade::handle<Law_BSpline>
-
Load
()¶ - loads initial and final tangents if any.
- param InitialTangent
- type InitialTangent
float
- param FinalTangent
- type FinalTangent
float
- rtype
None* loads the tangents. We should have as many tangents as they are points in the array if TangentFlags.Value(i) is Standard_True use the tangent Tangents.Value(i) otherwise the tangent is not constrained.
- param Tangents
- type Tangents
TColStd_Array1OfReal
- param TangentFlags
- type TangentFlags
TColStd_HArray1OfBoolean
- rtype
None
-
Perform
()¶ - Makes the interpolation
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Law_Laws
(*args)¶ Bases:
object
-
Append
()¶
-
Assign
()¶
-
Clear
()¶
-
First
()¶
-
InsertAfter
()¶
-
InsertBefore
()¶
-
Last
()¶
-
Prepend
()¶
-
Remove
()¶
-
RemoveFirst
()¶
-
Reverse
()¶
-
Set
()¶
-
Size
()¶
-
begin
()¶
-
cbegin
()¶
-
cend
()¶
-
end
()¶
-
property
thisown
¶ The membership flag
-
-
class
Law_Linear
(*args)¶ Bases:
OCC.Core.Law.Law_Function
- Constructs an empty linear evolution law.
- rtype
None
-
static
DownCast
(t)¶
-
Set
()¶ - Defines this linear evolution law by assigning both: - the bounds Pdeb and Pfin of the parameter, and - the values Valdeb and Valfin of the function at these two parametric bounds.
- param Pdeb
- type Pdeb
float
- param Valdeb
- type Valdeb
float
- param Pfin
- type Pfin
float
- param Valfin
- type Valfin
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
Law_ListIteratorOfLaws
(*args)¶ Bases:
object
-
ChangeValue
()¶
-
More
()¶
-
Next
()¶
-
Value
()¶
-
property
thisown
¶ The membership flag
-
-
class
Law_S
(*args)¶ Bases:
OCC.Core.Law.Law_BSpFunc
- Constructs an empty ‘S’ evolution law.
- rtype
None
-
static
DownCast
(t)¶
-
Set
()¶ - Defines this S evolution law by assigning both: - the bounds Pdeb and Pfin of the parameter, and - the values Valdeb and Valfin of the function at these two parametric bounds. The function is assumed to have the first derivatives equal to 0 at the two parameter points Pdeb and Pfin.
- param Pdeb
- type Pdeb
float
- param Valdeb
- type Valdeb
float
- param Pfin
- type Pfin
float
- param Valfin
- type Valfin
float
- rtype
None* Defines this S evolution law by assigning - the bounds Pdeb and Pfin of the parameter, - the values Valdeb and Valfin of the function at these two parametric bounds, and - the values Ddeb and Dfin of the first derivative of the function at these two parametric bounds.
- param Pdeb
- type Pdeb
float
- param Valdeb
- type Valdeb
float
- param Ddeb
- type Ddeb
float
- param Pfin
- type Pfin
float
- param Valfin
- type Valfin
float
- param Dfin
- type Dfin
float
- rtype
None
-
property
thisown
¶ The membership flag
-
class
SwigPyIterator
(*args, **kwargs)¶ Bases:
object
-
advance
()¶
-
copy
()¶
-
decr
()¶
-
distance
()¶
-
equal
()¶
-
incr
()¶
-
next
()¶
-
previous
()¶
-
property
thisown
¶ The membership flag
-
value
()¶
-
-
class
law
¶ Bases:
object
-
static
MixBnd
()¶ - This algorithm searches the knot values corresponding to the splitting of a given B-spline law into several arcs with the same continuity. The continuity order is given at the construction time. Builds a 1d bspline that is near from Lin with null derivatives at the extremities.
- param Lin
- type Lin
Law_Linear
- rtype
opencascade::handle<Law_BSpFunc>* Builds the poles of the 1d bspline that is near from Lin with null derivatives at the extremities.
- param Degree
- type Degree
int
- param Knots
- type Knots
TColStd_Array1OfReal
- param Mults
- type Mults
TColStd_Array1OfInteger
- param Lin
- type Lin
Law_Linear
- rtype
opencascade::handle<TColStd_HArray1OfReal>
-
static
MixTgt
()¶ - Builds the poles of the 1d bspline that is null on the rigth side of Knots(Index) (on the left if NulOnTheRight is false) and that is like a t*(1-t)(1-t) curve on the left side of Knots(Index) (on the rigth if NulOnTheRight is false). The result curve is C1 with a derivative equal to 1. at first parameter (-1 at last parameter if NulOnTheRight is false). Warning: Mults(Index) must greater or equal to degree-1.
- param Degree
- type Degree
int
- param Knots
- type Knots
TColStd_Array1OfReal
- param Mults
- type Mults
TColStd_Array1OfInteger
- param NulOnTheRight
- type NulOnTheRight
bool
- param Index
- type Index
int
- rtype
opencascade::handle<TColStd_HArray1OfReal>
-
static
Reparametrize
()¶ - Computes a 1 d curve to reparametrize a curve. Its an interpolation of NbPoints points calculated at quasi constant abscissa.
- param Curve
- type Curve
Adaptor3d_Curve
- param First
- type First
float
- param Last
- type Last
float
- param HasDF
- type HasDF
bool
- param HasDL
- type HasDL
bool
- param DFirst
- type DFirst
float
- param DLast
- type DLast
float
- param Rev
- type Rev
bool
- param NbPoints
- type NbPoints
int
- rtype
opencascade::handle<Law_BSpline>
-
static
Scale
()¶ - Computes a 1 d curve to scale a field of tangency. Value is 1. for t = (First+Last)/2 . If HasFirst value for t = First is VFirst (null derivative). If HasLast value for t = Last is VLast (null derivative). //! 1. _ _/ _ __/ __ / VFirst ____/ VLast ____ First Last
- param First
- type First
float
- param Last
- type Last
float
- param HasF
- type HasF
bool
- param HasL
- type HasL
bool
- param VFirst
- type VFirst
float
- param VLast
- type VLast
float
- rtype
opencascade::handle<Law_BSpline>
-
static
ScaleCub
()¶ - Parameters
First –
- type First
float
- param Last
- type Last
float
- param HasF
- type HasF
bool
- param HasL
- type HasL
bool
- param VFirst
- type VFirst
float
- param VLast
- type VLast
float
- rtype
opencascade::handle<Law_BSpline>
-
property
thisown
¶ The membership flag
-
static