cadquery icon indicating copy to clipboard operation
cadquery copied to clipboard

Problem with `shell` and `fillet`

Open mryndzionek opened this issue 3 years ago • 4 comments

Below simple code:

import cadquery as cq

a = cq.Workplane().box(5, 5, 5).faces(">Z").fillet(0.5)\
    .faces("<Z").shell(0.5)
    
a = a.faces("<Z").fillet(0.1)

gives me disappearing faces: problem Screenshot at 2022-01-18 22-23-21

mryndzionek avatar Jan 18 '22 21:01 mryndzionek

@mryndzionek There will still be weird behavior with this code, but it seems better.

import cadquery as cq

a = (cq.Workplane().box(5, 5, 5)
                   .faces("<Z").shell(0.5, kind='intersection')
                   .faces(">Z").fillet(0.1))
a = a.faces("<Z").fillet(0.1)

show_object(a)

By default, shell() creates arc corners, so you were applying fillets to areas that had already been rounded. I rearranged your code a little bit and added kind="intersection" (sharp corners) to the shell() call, which helped a little bit. I see that @adam-urbanczyk has marked this as a kernel issue, so that's probably as good as you're going to get right now.

jmwright avatar Jan 19 '22 14:01 jmwright

Looks similar on cq-editor 0.3.0dev. If it's a bug, it's a bug. Good to know I need to solve this differently. Thanks!

mryndzionek avatar Jan 19 '22 15:01 mryndzionek

Looks similar on cq-editor 0.3.0dev. If it's a bug, it's a bug. Good to know I need to solve this differently. Thanks!

You can use this as a workaround:

show_object(a.val().fix())

adam-urbanczyk avatar Jan 19 '22 18:01 adam-urbanczyk

Thanks!

mryndzionek avatar Jan 19 '22 20:01 mryndzionek