Open fleiner opened 4 months ago
The workaround would be to perturb the position of the sphere: res=res.cut(sphere.translate([10,1e-3,5]))
That does solve the cq-editor problem, but it does not solve the stl code. For the latter I have to perturb all three axis.
The following code using the fluent API works fine for me (the STL imports and slices without any errors).
import cadquery as cq
# Box
box = cq.Workplane().box(10, 10, 10)
# Sphere
sp = cq.Workplane().sphere(4)
sp = sp.translate((5, 5, 0))
# Resulting object
res = box.cut(sp)
show_object(res)
cq.exporters.export(res, "/home/jwright/Downloads/cut_obj.stl")
This very simple script creates a box and cuts out part of it with a sphere. It confuses cq-editor (instead of a cut one gets a hole to look into the cube), and creates a completely unusable stl file with over 1000 open edges, (the equivalent translate() call instead of transformGeometry() is slightly better with only 4 open edges). Is there any workaround? Thanks