Merge pull request #4770 from mpu-creare/master

Mod Part [doc]: Adding documentation to Part.BSplineCurve of Python API
This commit is contained in:
Yorik van Havre
2021-05-11 12:15:59 +02:00
committed by GitHub
2 changed files with 20 additions and 1 deletions

View File

@@ -380,6 +380,23 @@ from the knots table of this B-Spline curve.</UserDocu>
<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)]
# 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>

View File

@@ -91,7 +91,7 @@ length([uMin,uMax,Tol]) -> Float</UserDocu>
</Methode>
<Methode Name="parameterAtDistance" Const="true">
<Documentation>
<UserDocu>Returns the parameter on the curve of a point at the given distance from a starting parameter.
<UserDocu>Returns the parameter on the curve of a point at the given distance from a starting parameter.
parameterAtDistance([abscissa, startingParameter]) -> Float the</UserDocu>
</Documentation>
</Methode>
@@ -145,6 +145,8 @@ of the nearest orthogonal projection of the point.</UserDocu>
<Documentation>
<UserDocu>
Returns all intersection points and curve segments between the curve and the curve/surface.
arguments: curve/surface (for the intersection), precision (float)
</UserDocu>
</Documentation>
</Methode>