cadquery icon indicating copy to clipboard operation
cadquery copied to clipboard

extrude(until="next") should respect faces with holes

Open qwelyt opened this issue 2 years ago • 2 comments

box = (cq.Workplane("XY")
       .box(10,10,10)
       .faces(">Z")
       .shell(1)
       )
box_with_sketch = (box.faces(">Z")
                   .sketch()
                   .circle(5)
                   .rect(1,4, mode="s")
                   .rect(4,1, mode="s")
                   .finalize()
                   )
extrude_value = box_with_sketch.extrude(-10)
extrude_next = box_with_sketch.extrude(until="next")
show_object(extrude_value)
show_object(extrude_next.translate((13,0,0)))

I would expect both these boxes to look the same. But the one using until="next" ignores the cross and extrudes a fully filled circle.

20220505_131705

Please make until="next" respect the form that is being extruded. (It seems that occt does not really say if this is supported or not https://dev.opencascade.org/doc/refman/html/class_b_rep_feat___make_d_prism.html but could perhaps be solved by CQ?)

qwelyt avatar May 05 '22 12:05 qwelyt

Hm, looks like a limitation of dprism

adam-urbanczyk avatar May 06 '22 06:05 adam-urbanczyk

One thing that can be done is to add logic in the extrude method to make two dprism and cut the inner dprism from the outer one

Jojain avatar May 06 '22 07:05 Jojain