CadQuery / CadQuery/cadquery

2D Sweep Along Line

Open
#945 11 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
5.8k
Forks
541
Avg merge
3d 2h
Merged PRs (30d)
5

Description

Hello,

Is there a way to perform a 2D sweep along a path in CQ ? The resulting geometry should be a shell with zero thickness. Attached is a sample geometry created in FreeCAD and that's what I'm trying to do in CQ. The code below works when the profile geometry is a rectangle or circle but it doesn't work for line (ValueError: No pending wires present).

Thanks,

`import cadquery as cq

plane_path = "XY"
pts_path = [(0,0), (100, 100), (100, 200), (200, 400)]
path = cq.Workplane(plane_path, origin=pts_path[0]).polyline(pts_path)
show_object(path)

plane_profile = "XZ"
pts_profile = [(-5,0), (5, 0)]
profile = cq.Workplane(plane_profile).polyline(pts_profile)

show_object(profile)

SweepShell = profile.sweep(path, makeSolid=False, isFrenet=True)
show_object(SweepShell)`

![sweep_along_path](https://user-images.githubusercontent.com/7131674/147876075-e67367ae-afd3-4d30-b03a-86f17af8fa50.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.