Inner width of a polygon

How can I calculate the minimum inner width of a polygon?

A) That’s not a polygon (closed curve).
B) The angled right side creates problems because many vertical lines can be created that are shorter and parallel to your blue line.

It’s best to post multiple examples of internalized geometry (“polygons”) to test, and expected results.

That’s very easy with code … but I have no idea how to do it the other way.

Notify if you want a full C# take on that. Do you have open Polygons as well? (that’s a bit tricky, mind). Are your collections planar (up to some tolerance) ?. How many they are?

BTW: Polygons are called Polylines in R speech. If members/segments are Curves as well the combo is called PolyCurve (or confusingly: Curve).

1 Like

yes this is exactly am looking for. All polygons are co planer and closed ones.
Yes I would like to understand the C# you have used here. Will be very helpful. Thanks

I’m out in the wild for the moment.When back I’ll post the thing (+ TextDots to clarify what is where).

This means that you walk that walk?

BTW: I do have a stupid laptop with me. So spend 5 minutes for a “comparison combo” demo (what pair to take to extract min distance - but what is the min distance … this … is another matter). After that the only thing required is a Class with suitable Properties where you sample the combo data and then … well … IF THE Class contains any item - a simple LINQ query (OrderBy(x=>x.MinDist)) tells you the truth out there.

Polyline_MinW_ComboLogicDemo.gh (10.4 KB)

Can you please share the one you shared first ? I want exactly that

I’ m back - so get the thing (with some DextDot ability for fun).

Polyline_MinW_V1A.gh (135.3 KB)

NOTE: This is NOT the Jack for all Trades … but is some Jack anyway.

yeah sure one solution may not fit all. :slight_smile:
Thanks alot

That said: this DOES not check your Polygons for self ccx events, colinear Pts within a given segment … and numarous other “freaky/unexpected” situations.

Meaning that if you fail to prepare, prepare to fail.

Agree with you 100 % .
You have a very interesting personality:-)

BTW: feel free to sample and post here (in R5 format) Polygons (with no self ccx events) that refuse to play ball - they must be a zillion cases where the C# does bananas.