Part: [skip ci] improve whitespaces
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<GenerateModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="generateMetaModel_Module.xsd">
|
||||
<PythonExport
|
||||
<PythonExport
|
||||
Father="BoundedCurvePy"
|
||||
Name="BSplineCurvePy"
|
||||
Name="BSplineCurvePy"
|
||||
PythonName="Part.BSplineCurve"
|
||||
Twin="GeomBSplineCurve"
|
||||
TwinPointer="GeomBSplineCurve"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
Twin="GeomBSplineCurve"
|
||||
TwinPointer="GeomBSplineCurve"
|
||||
Include="Mod/Part/App/Geometry.h"
|
||||
Namespace="Part"
|
||||
FatherInclude="Mod/Part/App/BoundedCurvePy.h"
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer@users.sourceforge.net" />
|
||||
<UserDocu>Describes a B-Spline curve in 3D space</UserDocu>
|
||||
</Documentation>
|
||||
FatherNamespace="Part"
|
||||
Constructor="true">
|
||||
<Documentation>
|
||||
<Author Licence="LGPL" Name="Werner Mayer" EMail="wmayer@users.sourceforge.net" />
|
||||
<UserDocu>Describes a B-Spline curve in 3D space</UserDocu>
|
||||
</Documentation>
|
||||
<Methode Name="__reduce__" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>__reduce__()
|
||||
@@ -23,456 +23,456 @@ Serialization of Part.BSplineCurve objects
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Attribute Name="Degree" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the polynomial degree of this B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Degree" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="MaxDegree" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the value of the maximum polynomial degree of any
|
||||
<Documentation>
|
||||
<UserDocu>Returns the polynomial degree of this B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="Degree" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="MaxDegree" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the value of the maximum polynomial degree of any
|
||||
B-Spline curve curve. This value is 25.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="MaxDegree" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="NbPoles" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the number of poles of this B-Spline curve.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NbPoles" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="NbKnots" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Returns the number of knots of this B-Spline curve.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NbPoles" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="StartPoint" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the start point of this B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="StartPoint" Type="Object"/>
|
||||
</Attribute>
|
||||
<Attribute Name="EndPoint" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the end point of this B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="EndPoint" Type="Object"/>
|
||||
</Attribute>
|
||||
<Attribute Name="FirstUKnotIndex" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the index in the knot array of the knot
|
||||
</Documentation>
|
||||
<Parameter Name="MaxDegree" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="NbPoles" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the number of poles of this B-Spline curve.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NbPoles" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="NbKnots" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Returns the number of knots of this B-Spline curve.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="NbPoles" Type="Long"/>
|
||||
</Attribute>
|
||||
<Attribute Name="StartPoint" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the start point of this B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="StartPoint" Type="Object"/>
|
||||
</Attribute>
|
||||
<Attribute Name="EndPoint" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the end point of this B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="EndPoint" Type="Object"/>
|
||||
</Attribute>
|
||||
<Attribute Name="FirstUKnotIndex" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the index in the knot array of the knot
|
||||
corresponding to the first or last parameter
|
||||
of this B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="FirstUKnotIndex" Type="Object"/>
|
||||
</Attribute>
|
||||
<Attribute Name="LastUKnotIndex" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the index in the knot array of the knot
|
||||
</Documentation>
|
||||
<Parameter Name="FirstUKnotIndex" Type="Object"/>
|
||||
</Attribute>
|
||||
<Attribute Name="LastUKnotIndex" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the index in the knot array of the knot
|
||||
corresponding to the first or last parameter
|
||||
of this B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="LastUKnotIndex" Type="Object"/>
|
||||
</Attribute>
|
||||
<Attribute Name="KnotSequence" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the knots sequence of this B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="KnotSequence" Type="List"/>
|
||||
</Attribute>
|
||||
</Documentation>
|
||||
<Parameter Name="LastUKnotIndex" Type="Object"/>
|
||||
</Attribute>
|
||||
<Attribute Name="KnotSequence" ReadOnly="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the knots sequence of this B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
<Parameter Name="KnotSequence" Type="List"/>
|
||||
</Attribute>
|
||||
<Methode Name="isRational" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Returns true if this B-Spline curve is rational.
|
||||
A B-Spline curve is rational if, at the time of construction,
|
||||
the weight table has been initialized.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Returns true if this B-Spline curve is rational.
|
||||
A B-Spline curve is rational if, at the time of construction,
|
||||
the weight table has been initialized.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isPeriodic" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns true if this BSpline curve is periodic.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Documentation>
|
||||
<UserDocu>Returns true if this BSpline curve is periodic.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="isClosed" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Returns true if the distance between the start point and end point of
|
||||
this B-Spline curve is less than or equal to gp::Resolution().
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="increaseDegree">
|
||||
<Documentation>
|
||||
<UserDocu>increase(Int=Degree)
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Returns true if the distance between the start point and end point of
|
||||
this B-Spline curve is less than or equal to gp::Resolution().
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="increaseDegree">
|
||||
<Documentation>
|
||||
<UserDocu>increase(Int=Degree)
|
||||
Increases the degree of this B-Spline curve to Degree.
|
||||
As a result, the poles, weights and multiplicities tables
|
||||
are modified; the knots table is not changed. Nothing is
|
||||
done if Degree is less than or equal to the current degree.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="increaseMultiplicity">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
increaseMultiplicity(int index, int mult)
|
||||
increaseMultiplicity(int start, int end, int mult)
|
||||
Increases multiplicity of knots up to mult.
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="increaseMultiplicity">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
increaseMultiplicity(int index, int mult)
|
||||
increaseMultiplicity(int start, int end, int mult)
|
||||
Increases multiplicity of knots up to mult.
|
||||
|
||||
index: the index of a knot to modify (1-based)
|
||||
start, end: index range of knots to modify.
|
||||
If mult is lower or equal to the current multiplicity nothing is done. If mult is higher than the degree the degree is used.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="incrementMultiplicity">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
incrementMultiplicity(int start, int end, int mult)
|
||||
Raises multiplicity of knots by mult.
|
||||
index: the index of a knot to modify (1-based)
|
||||
start, end: index range of knots to modify.
|
||||
If mult is lower or equal to the current multiplicity nothing is done. If mult is higher than the degree the degree is used.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="incrementMultiplicity">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
incrementMultiplicity(int start, int end, int mult)
|
||||
Raises multiplicity of knots by mult.
|
||||
|
||||
start, end: index range of knots to modify.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="insertKnot">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
insertKnot(u, mult = 1, tol = 0.0)
|
||||
Inserts a knot value in the sequence of knots. If u is an existing knot the
|
||||
multiplicity is increased by mult. </UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="insertKnots">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
insertKnots(list_of_floats, list_of_ints, tol = 0.0, bool_add = True)
|
||||
Inserts a set of knots values in the sequence of knots.
|
||||
start, end: index range of knots to modify.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="insertKnot">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
insertKnot(u, mult = 1, tol = 0.0)
|
||||
Inserts a knot value in the sequence of knots. If u is an existing knot the
|
||||
multiplicity is increased by mult. </UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="insertKnots">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
insertKnots(list_of_floats, list_of_ints, tol = 0.0, bool_add = True)
|
||||
Inserts a set of knots values in the sequence of knots.
|
||||
|
||||
For each u = list_of_floats[i], mult = list_of_ints[i]
|
||||
For each u = list_of_floats[i], mult = list_of_ints[i]
|
||||
|
||||
If u is an existing knot the multiplicity is increased by mult if bool_add is
|
||||
True, otherwise increased to mult.
|
||||
If u is an existing knot the multiplicity is increased by mult if bool_add is
|
||||
True, otherwise increased to mult.
|
||||
|
||||
If u is not on the parameter range nothing is done.
|
||||
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.
|
||||
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.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="removeKnot">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
removeKnot(Index, M, tol)
|
||||
The tolerance criterion for knots equality is the max of Epsilon(U) and ParametricTolerance.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="removeKnot">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
removeKnot(Index, M, tol)
|
||||
|
||||
Reduces the multiplicity of the knot of index Index to M.
|
||||
If M is equal to 0, the knot is removed.
|
||||
With a modification of this type, the array of poles is also modified.
|
||||
Two different algorithms are systematically used to compute the new
|
||||
poles of the curve. If, for each pole, the distance between the pole
|
||||
calculated using the first algorithm and the same pole calculated using
|
||||
the second algorithm, is less than Tolerance, this ensures that the curve
|
||||
is not modified by more than Tolerance. Under these conditions, true is
|
||||
returned; otherwise, false is returned.
|
||||
Reduces the multiplicity of the knot of index Index to M.
|
||||
If M is equal to 0, the knot is removed.
|
||||
With a modification of this type, the array of poles is also modified.
|
||||
Two different algorithms are systematically used to compute the new
|
||||
poles of the curve. If, for each pole, the distance between the pole
|
||||
calculated using the first algorithm and the same pole calculated using
|
||||
the second algorithm, is less than Tolerance, this ensures that the curve
|
||||
is not modified by more than Tolerance. Under these conditions, true is
|
||||
returned; otherwise, false is returned.
|
||||
|
||||
A low tolerance is used to prevent modification of the curve.
|
||||
A high tolerance is used to 'smooth' the curve.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="segment">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
segment(u1,u2)
|
||||
Modifies this B-Spline curve by segmenting it.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setKnot">
|
||||
<Documentation>
|
||||
<UserDocu>Set a knot of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
A low tolerance is used to prevent modification of the curve.
|
||||
A high tolerance is used to 'smooth' the curve.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="segment">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
segment(u1,u2)
|
||||
Modifies this B-Spline curve by segmenting it.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setKnot">
|
||||
<Documentation>
|
||||
<UserDocu>Set a knot of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getKnot" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Get a knot of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setKnots">
|
||||
<Documentation>
|
||||
<UserDocu>Set knots of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Documentation>
|
||||
<UserDocu>Get a knot of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setKnots">
|
||||
<Documentation>
|
||||
<UserDocu>Set knots of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getKnots" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Get all knots of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setPole">
|
||||
<Documentation>
|
||||
<UserDocu>Modifies this B-Spline curve by assigning P
|
||||
<Documentation>
|
||||
<UserDocu>Get all knots of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setPole">
|
||||
<Documentation>
|
||||
<UserDocu>Modifies this B-Spline curve by assigning P
|
||||
to the pole of index Index in the poles table.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getPole" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Get a pole of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Documentation>
|
||||
<UserDocu>Get a pole of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getPoles" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Get all poles of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setWeight">
|
||||
<Documentation>
|
||||
<UserDocu>Set a weight of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Documentation>
|
||||
<UserDocu>Get all poles of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setWeight">
|
||||
<Documentation>
|
||||
<UserDocu>Set a weight of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getWeight" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Get a weight of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Documentation>
|
||||
<UserDocu>Get a weight of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getWeights" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Get all weights of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Documentation>
|
||||
<UserDocu>Get all weights of the B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getPolesAndWeights" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the table of poles and weights in homogeneous coordinates.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getResolution" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Computes for this B-Spline curve the parametric tolerance (UTolerance)
|
||||
<Documentation>
|
||||
<UserDocu>Returns the table of poles and weights in homogeneous coordinates.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getResolution" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Computes for this B-Spline curve the parametric tolerance (UTolerance)
|
||||
for a given 3D tolerance (Tolerance3D).
|
||||
If f(t) is the equation of this B-Spline curve, the parametric tolerance
|
||||
ensures that:
|
||||
|t1-t0| < UTolerance =""==> |f(t1)-f(t0)| < Tolerance3D</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="movePoint">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
movePoint(U, P, Index1, Index2)
|
||||
Moves the point of parameter U of this B-Spline curve to P.
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="movePoint">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
movePoint(U, P, Index1, Index2)
|
||||
Moves the point of parameter U of this B-Spline curve to P.
|
||||
Index1 and Index2 are the indexes in the table of poles of this B-Spline curve
|
||||
of the first and last poles designated to be moved.
|
||||
|
||||
Returns: (FirstModifiedPole, LastModifiedPole). They are the indexes of the
|
||||
first and last poles which are effectively modified.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setNotPeriodic">
|
||||
<Documentation>
|
||||
<UserDocu>Changes this B-Spline curve into a non-periodic curve.
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setNotPeriodic">
|
||||
<Documentation>
|
||||
<UserDocu>Changes this B-Spline curve into a non-periodic curve.
|
||||
If this curve is already non-periodic, it is not modified.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setPeriodic">
|
||||
<Documentation>
|
||||
<UserDocu>Changes this B-Spline curve into a periodic curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setOrigin">
|
||||
<Documentation>
|
||||
<UserDocu>Assigns the knot of index Index in the knots table
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setPeriodic">
|
||||
<Documentation>
|
||||
<UserDocu>Changes this B-Spline curve into a periodic curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="setOrigin">
|
||||
<Documentation>
|
||||
<UserDocu>Assigns the knot of index Index in the knots table
|
||||
as the origin of this periodic B-Spline curve. As a consequence,
|
||||
the knots and poles tables are modified.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getMultiplicity" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Returns the multiplicity of the knot of index
|
||||
<Documentation>
|
||||
<UserDocu>Returns the multiplicity of the knot of index
|
||||
from the knots table of this B-Spline curve.</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getMultiplicities" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Returns the multiplicities table M of the knots of this B-Spline curve.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="approximate" Keyword="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Replaces this B-Spline curve by approximating a set of points.
|
||||
The function accepts keywords as arguments.
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Returns the multiplicities table M of the knots of this B-Spline curve.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="approximate" Keyword="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Replaces this B-Spline curve by approximating a set of points.
|
||||
The function accepts keywords as arguments.
|
||||
|
||||
approximate(Points = list_of_points)
|
||||
approximate(Points = list_of_points)
|
||||
|
||||
Optional arguments :
|
||||
Optional arguments :
|
||||
|
||||
DegMin = integer (3) : Minimum degree of the curve.
|
||||
DegMax = integer (8) : Maximum degree of the curve.
|
||||
Tolerance = float (1e-3) : approximating tolerance.
|
||||
Continuity = string ('C2') : Desired continuity of the curve.
|
||||
Possible values : 'C0','G1','C1','G2','C2','C3','CN'
|
||||
DegMin = integer (3) : Minimum degree of the curve.
|
||||
DegMax = integer (8) : Maximum degree of the curve.
|
||||
Tolerance = float (1e-3) : approximating tolerance.
|
||||
Continuity = string ('C2') : Desired continuity of the curve.
|
||||
Possible values : 'C0','G1','C1','G2','C2','C3','CN'
|
||||
|
||||
LengthWeight = float, CurvatureWeight = float, TorsionWeight = float
|
||||
If one of these arguments is not null, the functions approximates the
|
||||
points using variational smoothing algorithm, which tries to minimize
|
||||
additional criterium:
|
||||
LengthWeight*CurveLength + CurvatureWeight*Curvature + TorsionWeight*Torsion
|
||||
LengthWeight = float, CurvatureWeight = float, TorsionWeight = float
|
||||
If one of these arguments is not null, the functions approximates the
|
||||
points using variational smoothing algorithm, which tries to minimize
|
||||
additional criterium:
|
||||
LengthWeight*CurveLength + CurvatureWeight*Curvature + TorsionWeight*Torsion
|
||||
Continuity must be C0, C1(with DegMax >= 3) or C2(with DegMax >= 5).
|
||||
|
||||
Parameters = list of floats : knot sequence of the approximated points.
|
||||
This argument is only used if the weights above are all null.
|
||||
Parameters = list of floats : knot sequence of the approximated points.
|
||||
This argument is only used if the weights above are all null.
|
||||
|
||||
ParamType = string ('Uniform','Centripetal' or 'ChordLength')
|
||||
Parameterization type. Only used if weights and Parameters above aren't specified.
|
||||
ParamType = string ('Uniform','Centripetal' or 'ChordLength')
|
||||
Parameterization type. Only used if weights and Parameters above aren't specified.
|
||||
|
||||
Note : Continuity of the spline defaults to C2. However, it may not be applied if
|
||||
it conflicts with other parameters ( especially DegMax ).
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
Note : Continuity of the spline defaults to C2. However, it may not be applied if
|
||||
it conflicts with other parameters ( especially DegMax ).
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="getCardinalSplineTangents" Keyword="true" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>Compute the tangents for a Cardinal spline</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="interpolate" Keyword="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Replaces this B-Spline curve by interpolating a set of points.
|
||||
The function accepts keywords as arguments.
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Replaces this B-Spline curve by interpolating a set of points.
|
||||
The function accepts keywords as arguments.
|
||||
|
||||
interpolate(Points = list_of_points)
|
||||
interpolate(Points = list_of_points)
|
||||
|
||||
Optional arguments :
|
||||
Optional arguments :
|
||||
|
||||
PeriodicFlag = bool (False) : Sets the curve closed or opened.
|
||||
Tolerance = float (1e-6) : interpolating tolerance
|
||||
PeriodicFlag = bool (False) : Sets the curve closed or opened.
|
||||
Tolerance = float (1e-6) : interpolating tolerance
|
||||
|
||||
Parameters : knot sequence of the interpolated points.
|
||||
If not supplied, the function defaults to chord-length parameterization.
|
||||
If PeriodicFlag == True, one extra parameter must be appended.
|
||||
Parameters : knot sequence of the interpolated points.
|
||||
If not supplied, the function defaults to chord-length parameterization.
|
||||
If PeriodicFlag == True, one extra parameter must be appended.
|
||||
|
||||
EndPoint Tangent constraints :
|
||||
EndPoint Tangent constraints :
|
||||
|
||||
InitialTangent = vector, FinalTangent = vector
|
||||
specify tangent vectors for starting and ending points
|
||||
of the BSpline. Either none, or both must be specified.
|
||||
InitialTangent = vector, FinalTangent = vector
|
||||
specify tangent vectors for starting and ending points
|
||||
of the BSpline. Either none, or both must be specified.
|
||||
|
||||
Full Tangent constraints :
|
||||
Full Tangent constraints :
|
||||
|
||||
Tangents = list_of_vectors, TangentFlags = list_of_bools
|
||||
Both lists must have the same length as Points list.
|
||||
Tangents specifies the tangent vector of each point in Points list.
|
||||
TangentFlags (bool) activates or deactivates the corresponding tangent.
|
||||
These arguments will be ignored if EndPoint Tangents (above) are also defined.
|
||||
Tangents = list_of_vectors, TangentFlags = list_of_bools
|
||||
Both lists must have the same length as Points list.
|
||||
Tangents specifies the tangent vector of each point in Points list.
|
||||
TangentFlags (bool) activates or deactivates the corresponding tangent.
|
||||
These arguments will be ignored if EndPoint Tangents (above) are also defined.
|
||||
|
||||
Note : Continuity of the spline defaults to C2. However, if periodic, or tangents
|
||||
are supplied, the continuity will drop to C1.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="buildFromPoles">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Builds a B-Spline by a list of poles.
|
||||
arguments: poles (sequence of Base.Vector), [periodic (default is False), degree (default is 3), interpolate (default is False)]
|
||||
Note : Continuity of the spline defaults to C2. However, if periodic, or tangents
|
||||
are supplied, the continuity will drop to C1.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="buildFromPoles">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Builds a B-Spline by a list of poles.
|
||||
arguments: poles (sequence of Base.Vector), [periodic (default is False), degree (default is 3), interpolate (default is False)]
|
||||
|
||||
Examples:
|
||||
from FreeCAD import Base
|
||||
import Part
|
||||
V = Base.Vector
|
||||
poles = [V(-2, 2, 0),V(0, 2, 1),V(2, 2, 0),V(2, -2, 0),V(0, -2, 1),V(-2, -2, 0)]
|
||||
Examples:
|
||||
from FreeCAD import Base
|
||||
import Part
|
||||
V = Base.Vector
|
||||
poles = [V(-2, 2, 0),V(0, 2, 1),V(2, 2, 0),V(2, -2, 0),V(0, -2, 1),V(-2, -2, 0)]
|
||||
|
||||
# non-periodic spline
|
||||
n=Part.BSplineCurve()
|
||||
n.buildFromPoles(poles)
|
||||
Part.show(n.toShape())
|
||||
# non-periodic spline
|
||||
n=Part.BSplineCurve()
|
||||
n.buildFromPoles(poles)
|
||||
Part.show(n.toShape())
|
||||
|
||||
# periodic spline
|
||||
n=Part.BSplineCurve()
|
||||
n.buildFromPoles(poles, True)
|
||||
Part.show(n.toShape())
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="buildFromPolesMultsKnots" Keyword="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Builds a B-Spline by a lists of Poles, Mults, Knots.
|
||||
arguments: poles (sequence of Base.Vector), [mults , knots, periodic, degree, weights (sequence of float), CheckRational]
|
||||
# periodic spline
|
||||
n=Part.BSplineCurve()
|
||||
n.buildFromPoles(poles, True)
|
||||
Part.show(n.toShape())
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="buildFromPolesMultsKnots" Keyword="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Builds a B-Spline by a lists of Poles, Mults, Knots.
|
||||
arguments: poles (sequence of Base.Vector), [mults , knots, periodic, degree, weights (sequence of float), CheckRational]
|
||||
|
||||
Examples:
|
||||
from FreeCAD import Base
|
||||
import Part
|
||||
V=Base.Vector
|
||||
poles=[V(-10,-10),V(10,-10),V(10,10),V(-10,10)]
|
||||
Examples:
|
||||
from FreeCAD import Base
|
||||
import Part
|
||||
V=Base.Vector
|
||||
poles=[V(-10,-10),V(10,-10),V(10,10),V(-10,10)]
|
||||
|
||||
# non-periodic spline
|
||||
n=Part.BSplineCurve()
|
||||
n.buildFromPolesMultsKnots(poles,(3,1,3),(0,0.5,1),False,2)
|
||||
Part.show(n.toShape())
|
||||
# non-periodic spline
|
||||
n=Part.BSplineCurve()
|
||||
n.buildFromPolesMultsKnots(poles,(3,1,3),(0,0.5,1),False,2)
|
||||
Part.show(n.toShape())
|
||||
|
||||
# periodic spline
|
||||
p=Part.BSplineCurve()
|
||||
p.buildFromPolesMultsKnots(poles,(1,1,1,1,1),(0,0.25,0.5,0.75,1),True,2)
|
||||
Part.show(p.toShape())
|
||||
# periodic spline
|
||||
p=Part.BSplineCurve()
|
||||
p.buildFromPolesMultsKnots(poles,(1,1,1,1,1),(0,0.25,0.5,0.75,1),True,2)
|
||||
Part.show(p.toShape())
|
||||
|
||||
# periodic and rational spline
|
||||
r=Part.BSplineCurve()
|
||||
r.buildFromPolesMultsKnots(poles,(1,1,1,1,1),(0,0.25,0.5,0.75,1),True,2,(1,0.8,0.7,0.2))
|
||||
Part.show(r.toShape())
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
# periodic and rational spline
|
||||
r=Part.BSplineCurve()
|
||||
r.buildFromPolesMultsKnots(poles,(1,1,1,1,1),(0,0.25,0.5,0.75,1),True,2,(1,0.8,0.7,0.2))
|
||||
Part.show(r.toShape())
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="toBezier" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Build a list of Bezier splines.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Build a list of Bezier splines.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="toBiArcs" Const="true">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Build a list of arcs and lines to approximate the B-spline.
|
||||
toBiArcs(tolerance) -> list.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="join">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Build a new spline by joining this and a second spline.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="makeC1Continuous">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
makeC1Continuous(tol = 1e-6, ang_tol = 1e-7)
|
||||
Reduces as far as possible the multiplicities of the knots of this BSpline
|
||||
(keeping the geometry). It returns a new BSpline, which could still be C0.
|
||||
tol is a geometrical tolerance.
|
||||
The tol_ang is angular tolerance, in radians. It sets tolerable angle mismatch
|
||||
of the tangents on the left and on the right to decide if the curve is G1 or
|
||||
not at a given point.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="scaleKnotsToBounds">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Scales the knots list to fit the specified bounds.
|
||||
The shape of the curve is not modified.
|
||||
bspline_curve.scaleKnotsToBounds(u0, u1)
|
||||
Default arguments are (0.0, 1.0)
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
</PythonExport>
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Build a list of arcs and lines to approximate the B-spline.
|
||||
toBiArcs(tolerance) -> list.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="join">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Build a new spline by joining this and a second spline.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="makeC1Continuous">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
makeC1Continuous(tol = 1e-6, ang_tol = 1e-7)
|
||||
Reduces as far as possible the multiplicities of the knots of this BSpline
|
||||
(keeping the geometry). It returns a new BSpline, which could still be C0.
|
||||
tol is a geometrical tolerance.
|
||||
The tol_ang is angular tolerance, in radians. It sets tolerable angle mismatch
|
||||
of the tangents on the left and on the right to decide if the curve is G1 or
|
||||
not at a given point.
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
<Methode Name="scaleKnotsToBounds">
|
||||
<Documentation>
|
||||
<UserDocu>
|
||||
Scales the knots list to fit the specified bounds.
|
||||
The shape of the curve is not modified.
|
||||
bspline_curve.scaleKnotsToBounds(u0, u1)
|
||||
Default arguments are (0.0, 1.0)
|
||||
</UserDocu>
|
||||
</Documentation>
|
||||
</Methode>
|
||||
</PythonExport>
|
||||
</GenerateModel>
|
||||
|
||||
@@ -72,7 +72,7 @@ int BSplineCurvePy::PyInit(PyObject* args, PyObject* kwd)
|
||||
PyObject* obj;
|
||||
// poles, [ periodic, degree, interpolate ]
|
||||
// {"poles", "mults", "knots", "periodic", "degree", "weights", "CheckRational", NULL};
|
||||
obj = buildFromPolesMultsKnots(args,kwd);
|
||||
obj = buildFromPolesMultsKnots(args, kwd);
|
||||
|
||||
if (obj) {
|
||||
Py_DECREF(obj);
|
||||
@@ -154,7 +154,7 @@ PyObject* BSplineCurvePy::increaseDegree(PyObject * args)
|
||||
(getGeometryPtr()->handle());
|
||||
curve->IncreaseDegree(degree);
|
||||
Py_Return;
|
||||
} PY_CATCH_OCC ;
|
||||
} PY_CATCH_OCC;
|
||||
}
|
||||
|
||||
PyObject* BSplineCurvePy::increaseMultiplicity(PyObject * args)
|
||||
@@ -236,14 +236,14 @@ PyObject* BSplineCurvePy::insertKnots(PyObject * args)
|
||||
|
||||
try {
|
||||
Py::Sequence knots(obj1);
|
||||
TColStd_Array1OfReal k(1,knots.size());
|
||||
TColStd_Array1OfReal k(1, knots.size());
|
||||
int index=1;
|
||||
for (Py::Sequence::iterator it = knots.begin(); it != knots.end(); ++it) {
|
||||
Py::Float val(*it);
|
||||
k(index++) = (double)val;
|
||||
}
|
||||
Py::Sequence mults(obj2);
|
||||
TColStd_Array1OfInteger m(1,mults.size());
|
||||
TColStd_Array1OfInteger m(1, mults.size());
|
||||
index=1;
|
||||
for (Py::Sequence::iterator it = mults.begin(); it != mults.end(); ++it) {
|
||||
Py::Long val(*it);
|
||||
@@ -266,14 +266,14 @@ PyObject* BSplineCurvePy::insertKnots(PyObject * args)
|
||||
PyObject* BSplineCurvePy::removeKnot(PyObject * args)
|
||||
{
|
||||
double tol;
|
||||
int Index,M;
|
||||
int Index, M;
|
||||
if (!PyArg_ParseTuple(args, "iid", &Index, &M, &tol))
|
||||
return nullptr;
|
||||
|
||||
try {
|
||||
Handle(Geom_BSplineCurve) curve = Handle(Geom_BSplineCurve)::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
Standard_Boolean ok = curve->RemoveKnot(Index,M,tol);
|
||||
Standard_Boolean ok = curve->RemoveKnot(Index, M, tol);
|
||||
return PyBool_FromLong(ok ? 1 : 0);
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
@@ -284,22 +284,22 @@ PyObject* BSplineCurvePy::removeKnot(PyObject * args)
|
||||
|
||||
PyObject* BSplineCurvePy::segment(PyObject * args)
|
||||
{
|
||||
double u1,u2;
|
||||
if (!PyArg_ParseTuple(args, "dd", &u1,&u2))
|
||||
double u1, u2;
|
||||
if (!PyArg_ParseTuple(args, "dd", &u1, &u2))
|
||||
return nullptr;
|
||||
try {
|
||||
Handle(Geom_BSplineCurve) curve = Handle(Geom_BSplineCurve)::DownCast
|
||||
(getGeometryPtr()->handle());
|
||||
Handle(Geom_BSplineCurve) tempCurve = Handle(Geom_BSplineCurve)::DownCast
|
||||
(curve->Copy());
|
||||
tempCurve->Segment(u1,u2);
|
||||
tempCurve->Segment(u1, u2);
|
||||
if (std::abs(tempCurve->FirstParameter()-u1) > Precision::Approximation() ||
|
||||
std::abs(tempCurve->LastParameter()-u2) > Precision::Approximation()) {
|
||||
Standard_Failure::Raise("Failed to segment BSpline curve");
|
||||
return nullptr;
|
||||
}
|
||||
else {
|
||||
curve->Segment(u1,u2);
|
||||
curve->Segment(u1, u2);
|
||||
}
|
||||
Py_Return;
|
||||
}
|
||||
@@ -1401,7 +1401,7 @@ PyObject* BSplineCurvePy::scaleKnotsToBounds(PyObject *args)
|
||||
try {
|
||||
if (u0 >= u1) {
|
||||
Standard_Failure::Raise("Bad parameter range");
|
||||
return nullptr;;
|
||||
return nullptr;
|
||||
}
|
||||
GeomBSplineCurve* curve = getGeomBSplineCurvePtr();
|
||||
curve->scaleKnotsToBounds(u0, u1);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user