CadQuery / cadquery

A python parametric CAD scripting framework based on OCCT
https://cadquery.readthedocs.io
Other
3.26k stars 295 forks source link

hole in model disappears when sides are filleted #1668

Open bigfighter opened 2 months ago

bigfighter commented 2 months ago
from cadquery.occ_impl.shapes import *

base = face(rect(50, 50)) - face(rect(40, 40))
base = base.fillet2D(5, base.vertices('<X')) # A
base = extrude(base, (0, 0, 5))
#base = base.fillet(0.5, base.edges('>X')) # B

from cadquery import version
print(version('cadquery'))

base # display in jypyter

if neither A nor B is commented out, then the hole disappears from the block. is this a bug?

image image

I'm running cadquery in docker.

adam-urbanczyk commented 2 months ago

Looks at least weird.

adam-urbanczyk commented 1 week ago

It seems to be a bug of offset2D (the returned face is invalid). Here is a workaround:

from cadquery.occ_impl.shapes import *

base = plane(50, 50)
base = base.fillet2D(5, base.vertices('<X')) - plane(40, 40) # A
base = extrude(base, (0, 0, 5)