How to sweep multisection along 3D..?
- Dominant language
- Python
- Stars
- 5.8k
- Forks
- 541
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 5
Description
Dear all,
I would like to sweep from one diameter to another in a 3D space using points and spline. I tried using "Sweep_with_multisection" example. But, this uses offset in a single coordinate which is not useful for my case.
Below, I have mentioned the code in which the base I need diameter of 4mm and top I need diameter of 2 mm.
`import cadquery as cq
from cadquery import exporters
show = show_object
#circle = cq.Workplane("XY").circle(0.072)
#show(circle)
dia = 2
x = 50
y = 0
z = -5
pts = [(x, y, z), (x, (y+2), z), ((x-2), (y+14), z)]
path= cq.Workplane("XY").moveTo(x, 0).spline(pts)
sweep = cq.Workplane("XZ").moveTo(x, z).circle(dia).sweep(path)`
From the above code, I get the entire tube as diameter 2. Below is the manipulated code for sweep.
`sweep = cq.Workplane("XZ").moveTo(x, z).circle(4).workplane(offset = (x-2, y+14, z)).circle(dia).sweep(path, multisection=True)`.
How to modify this sweep code so as to obtain base dia as 4mm and top dia as 2mm.
Below is the reference image.
[Sweep_link](https://drive.google.com/file/d/1jno-Yb3Rq0xpfBWTqriQ9zAtHltoAgov/view?usp=sharing)
Any leads will be appreciated.
Regards,
Sunag R A.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.