Skip to content

Commit

Permalink
Merge pull request #555 from just-georgeb/parametricCurveFix
Browse files Browse the repository at this point in the history
Expose makeWire to parametricCurve
  • Loading branch information
jmwright authored Dec 29, 2020
2 parents 337b612 + e6feeb9 commit 84acb70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cadquery/cq.py
Original file line number Diff line number Diff line change
Expand Up @@ -1746,6 +1746,7 @@ def parametricCurve(
N: int = 400,
start: float = 0,
stop: float = 1,
makeWire: bool = True,
) -> "Workplane":
"""
Create a spline interpolated through the provided points.
Expand All @@ -1755,14 +1756,15 @@ def parametricCurve(
:param N: number of points for discretization
:param start: starting value of the parameter t
:param stop: final value of the parameter t
:param makeWire: convert the resulting spline edge to a wire
:return: a Workplane object with the current point unchanged
"""

diff = stop - start
allPoints = [func(start + diff * t / N) for t in range(N + 1)]

return self.spline(allPoints, includeCurrent=False, makeWire=True)
return self.spline(allPoints, includeCurrent=False, makeWire=makeWire)

def ellipseArc(
self,
Expand Down

0 comments on commit 84acb70

Please sign in to comment.