If a wire is totally inside the other wire ?

Hello, everyone!

Does anybody know the way to find out if a TopoDS_Wire is totally inside the another TopoDS_Wire ?

Benjamin Bihler's picture

Hi!

I guess that for free polygons in space you would have to define more criteria what you mean with "inside".

But if the wires are located on shells, then "inside" is clear term. I have thought a lot about your question and up to now my solution is to trim the shell by the outer wire and then to check whether the distance of the trimmed shell to the other wire is zero (smaller than Precision::Confusion() of course). If this is the case and the distance between the wires is larger than zero, then the other wire is completely inside the outer wire. This works well.

If anyone has a simpler or faster solution I would be really interested in it.

Benjamin

Frank Martinez's picture

Hi,

If both wires are closed, what do you think about:

1. Make inner face from inner wire
2. Make outer face from outer wire
3. Cut the outer face from the inner face and check if the result is null
 

Too expensive using BOP here?

Frank.