ThreeCSG icon indicating copy to clipboard operation
ThreeCSG copied to clipboard

Hole inside a hole with mesh inside the second hole.

Open ghost opened this issue 7 years ago • 3 comments

First off, great lib! Secondly, I know I really should give you a jsfiddle for this, but wanted to just do a sanity check before I go through the pain of abstracting it into a fiddle

I have a problem where I have a mesh (say 300x300x20 box) From that I subtract objects (example screenshot) meshes

Working from the outside in, the first cut (subtract) works fine. The second shape I subtract from a shape that was "inside" the first subtraction, does the subtraction, but doesnt fill in any geometry inside this mesh

Desired result (drawn in sketchup to illustrate the point) desired

Result with threejs and ThreeCSG.js

hole inside a hole

Applies to any shapes I throw at it, by the way, circles, triangles, rectangles, anything

The "subtracted" geometry is a 2d shape with holes, that gets extruded using threejs.

So my question is

a) Am i barking up the wrong tree, can this lib do what I need? b) Am i doing something wrong (suspect you'll need a jsfiddle after all) c) Am i just missing some extra steps like computing something between first subtraction and second subtraction?

ghost avatar May 19 '17 17:05 ghost

hole inside a hole - arrows

ghost avatar May 19 '17 17:05 ghost

Sorry, I'm not quite clear what the result you're looking for is, or the steps you're taking to try and get there. A fiddle would be very appreciated :)

chandlerprall avatar May 24 '17 02:05 chandlerprall

When subtracting geometry try and avoid coplanar faces. So your 'punches' need to be thicker than the sheet and protrude past both sides.

DanielJoyce avatar Jun 03 '17 19:06 DanielJoyce