Skip to content

How to tell if a geometry is disjoint? #166

Discussion options

You must be logged in to vote

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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by BarbourSmith
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants