CadQuery / CadQuery/cadquery

Apparent hang when cutting a helix from a shape

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

Description

Trying to make a threaded screw. There seems to be a hang when cutting certain sized helixes from other objects. Am I doing something quite wrong?

Please try the code below.

```
import cadquery as cq

r = 0.42 # Radius of the helix
p = 0.4 # Pitch of the helix

#### CHANGE TO 2.5 and no cut
#### CHANGE TO 3.0 and it hangs
h = 2.49 # Height of the helix

# Helix
wire = cq.Wire.makeHelix(pitch=p, height=h, radius=r)
helix = cq.Workplane(obj=wire)

shaft = (
cq.Workplane('XY')
.circle(0.1)
.workplane(offset=0.5)
.circle(0.4)
.loft()
.faces('>Z')
.circle(0.4)
.extrude(2.0)
)
#show_object(shaft)

# Final result. A circle sweeped along a helix.
threads = (
cq.Workplane('XZ')
.center(r, -0.5)
.polyline(((-.15,0.05), (0.0,0.01), (0,0.39), (-0.15,0.35)))
.close()
.sweep(helix, isFrenet=True)
)
#show_object(threads)

result = shaft.cut(threads)
show_object(result)
```

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.