How to tell if a geometry is disjoint? #166
Unanswered
BarbourSmith
asked this question in
Modelling help
Replies: 1 comment
-
You can list the solids in the shape, with a function like that: function getSolids(compound) {
return Array.from(iterTopo(compound.wrapped, "solid"), (s) => new Solid(s));
} This is using the mechanism that I use to list all edges or faces of a shape exposed as a function. You can see it used here. Note I am not 100% sure of my answer (there might be edge cases about it in the underlying library that I am not aware of). Tell me if you find them. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have an interesting issue.
I'm working on automatically nesting parts to fit on a sheet to be cut out, and by and large it's working great.
The issue is that when I have a single part (in this case created a rectangle which was extruded) which is then cut into three pieces by another part using .cut
The issue is that when we get to the final nesting step we want to treat each of these three separate disjoint parts as unique and lay them out separately. Where I'm stuck is that I'm not sure how to tell that these parts are no-longer connected together.
Is there a way that I can see that this single geometry is actually three disjoint geometries and treat them that way? IE in this case the three rectangles would be handled the same as if they had been created with three rectangles extruded individually instead of one rectangle split into three with .cut?
Beta Was this translation helpful? Give feedback.
All reactions