Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose makeWire to parametricCurve #555

Merged
merged 1 commit into from
Dec 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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