Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hole inside a hole with mesh inside the second hole. #32

Open
ghost opened this issue May 19, 2017 · 3 comments
Open

Hole inside a hole with mesh inside the second hole. #32

ghost opened this issue May 19, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented May 19, 2017

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
Copy link
Author

ghost commented May 19, 2017

hole inside a hole - arrows

@chandlerprall
Copy link
Owner

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 :)

@DanielJoyce
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants