gumyr / cq_warehouse

A cadquery parametric part collection

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem with threads

cyberhuman opened this issue · comments

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?

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