gumyr / cq_warehouse

A cadquery parametric part collection
Apache License 2.0
116 stars 24 forks source link

Problem with threads #81

Open cyberhuman opened 1 year ago

cyberhuman commented 1 year ago

When I create a thread with certain parameters and union it with a plate, the thread (or the plate) disappears. Here is the minimal code that shows the issue.

import cadquery as cq
from cq_warehouse import thread

plate = (
    cq.Workplane("XY")
    .sketch()
    .circle(40)
    .circle(12, mode='s')
    .finalize()
    .extrude(15)
)
thread = (
    thread.IsoThread(
        24, 3, 15,
        external=False,
        end_finishes=("square","fade"),
    )
)
result = plate.union(thread)
show_object(thread, name="missing shape", options={"color":"red"})
show_object(result, name="union")

image Is this an issue in cq_warehouse or in the OCC kernel?

gumyr commented 1 year ago

The OCCT core has a problem merging the thread with the other object with they don't overlap a little - I don't know why this is. So, if you change the major_diameter to 23.99 you'll get this: image