cadquery icon indicating copy to clipboard operation
cadquery copied to clipboard

No solids on intersect with helix

Open ngladbach opened this issue 2 years ago • 1 comments
trafficstars

Hi, I have a problem when executing this code:

height = 35
radius = 19.8
pitch = 10
teethDepth = 3
wall = 0.8

wire = cq.Wire.makeHelix(pitch=pitch, height=height*2, radius=radius)
helix = cq.Workplane(obj=wire)

result = (
        cq.Workplane("XZ")
        .center(radius, 0)
        .polyline((
            (0, 0),
            (wall, 0),
            (wall+teethDepth, pitch/2),
            (wall, pitch),
            (0, pitch),
            (teethDepth, pitch/2)
        ))
        .close() 
        .sweep(helix, isFrenet=True)
    )
result = result.intersect(
        cq.Workplane("XY")
        .workplane(offset=pitch * 1.75)
        .circle(radius*2)
        .extrude(height),
        clean=False
    )

The result is empty. When I change radius to 19.0 it works and I get a thread with clean straight cuts on the top and bottom. but not with 19.8. Same behaviour with other values.

What goes wrong? And there is no Exception thrown.

Environment:

Linux, Python 3.9, cadquery 2.2.0

ngladbach avatar May 01 '23 15:05 ngladbach

With master I get the following (AFAICT correct) result.

afbeelding

adam-urbanczyk avatar May 04 '23 06:05 adam-urbanczyk