I want to create a sweep of a parametric spline
- Dominant language
- Python
- Stars
- 5.8k
- Forks
- 541
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 5
Description
i want to sweep a circle with a parametric spline(whose points will be changed as per user). For this, i am struggling to find a method in which the circle plane should always be normal to spline at the starting point for a perfect sweep. Here is my code
pts = [
(20,50),
(25,75),
(30,125)
]
path = cq.Workplane("ZX").moveTo(5,25).spline(pts)
plane1 = cq.Workplane("ZY")
sweep = plane1.workplane(offset= -25).center(5,0).transformed(offset=(0, 0,), rotate=(0, -78.3, 0)).circle(10).sweep(path)
right now, my code is not parametrized and is hardcoded for one spline(though still circle not normal)
One approach we can do by calculating the tangent of the spline from its formulae but i don't know what cadquery use like cubic bezier curve or something else.
I also have a side query of how to join 2 paths sweep( for my case a line and a spline)
I am attaching a few SS for reference


Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.