shapesmith.deprecated icon indicating copy to clipboard operation
shapesmith.deprecated copied to clipboard

internal surfaces missing from nested subtraction

Open splace opened this issue 12 years ago • 3 comments

this json ;

[{"type":"subtract","children":[{"type":"cylinder","parameters":{"r":3,"h":14},"children":[],"transforms":[{"type":"rotate","origin":{"x":8,"y":13,"z":7},"parameters":{"u":0,"v":1,"w":0,"angle":90,"n":0}},{"type":"translate","origin":{"x":8,"y":13,"z":0},"parameters":{"u":-8,"v":-13,"w":-1,"n":0}}],"origin":{"x":8,"y":13,"z":0}},{"type":"subtract","children":[{"type":"sphere","parameters":{"r":4},"children":[],"transforms":[],"origin":{"x":0,"y":0,"z":7}},{"type":"cuboid","parameters":{"u":10,"v":10,"w":10},"origin":{"x":-5,"y":-5,"z":0}}]}]}]

produces this for me;

missing inside faces

splace avatar Apr 23 '12 21:04 splace

The STL is also wrong so it doesn't look like a rendering issue. Could be a OpenCASCADE issue

bjnortier avatar Apr 23 '12 22:04 bjnortier

changing sphere radius to 4.0001 fixes problem. (or 3.9999)

seems like someone didn't consider what to do with an exact equality somewhere.

whats wrong with the STL?

splace avatar Apr 25 '12 18:04 splace

The STL only had the triangles of the outside cube, as per the rendered image.

bjnortier avatar Apr 30 '12 16:04 bjnortier