0000895: Part.BSplineCurve: allow to set degree and mutliplicites when calling constructor.
This commit is contained in:
@@ -275,7 +275,28 @@ from the knots table of this B-Spline curve.</UserDocu>
|
||||
<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 Base.Vector), CheckRational]
|
||||
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)]
|
||||
|
||||
# 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 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>
|
||||
|
||||
Reference in New Issue
Block a user