Notifications
Clear all

[Closed] finding the narrowest doorway

Hello,

I need to find the narrowest doorway of for example a deformed tube (image below).
But i have no clue how to do this.
Some ideas / advise on how to program this would be greatly appreciated

4 Replies

How about trying to find closed edgeloops and then choosing the one with the shortest length over the edges?

what do we know about the tube? goes it has open edges only on the sides? does it has perfect edge loops along ‘whole mesh’?
if so we can start from first loop (easy to find in open edges), use setLoopShift to go to the next loop, and calculate THE BEST BBox for every loop.
the best bbox is a bbox with minimum volume (2D bbox is with minimum area).
after that check all bboxes and find minimum width and length. that will be the narrowest place.

Thank you Pjanssen and DenisT for the quick response.

DenisT : thank you for the answer, in an ideal situation your solution would work.but you are right with your questions. This wont work if it doesnt has perfect edgeloops or is a closed model and i have a model like this.

Just some thoughts of mine.I dont have the solution. but may something like this:

collecting all edges and edge lengths
then recursive fn where it takes one edge lenght and keep adding/comparing till it has found the smallest loop.

or maybe

use a slice modifer and move in one direction (front to back) and stops when it finds the smallest loop. but then you only have one direction.

Ideas / advise / hints are welcome.

1 Reply
(@denist)
Joined: 1 year ago

Posts: 0

if you might have not perfect loops the idea with loops will not work.
how is about to cast intersection ray along every vertex normal? the rayMeshProjIntersectOps has #doublesided option. so we can get in and out hits, and check distance between them.