Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4140

Cull boundary curves?

$
0
0

@p1r4t3b0y wrote:

Hello,

I’ve written a Python script that turns a network of connected lines into polygons.

The above image shows three geometries: the lighter, bigger polygon, the darker triangle, and the boundary polygon, represented by the pink outline.
This external hull is a problem that I encounter for some networks, but not all!
In my script I can’t get rid of this boundary right away - during the line sorting -, since it is ignorant towards checking for boundaries. It has no concept of all the possible polygons.
My hope is to sort them out afterwards.

Which would be an efficient way to filter out boundaries, starting from lines and indices of lines, forming polygons?
It’s possible that a whole bunch of polygons have to be checked. This is a rather simple example!
Furthermore, boundaries aren’t found for each line network. They mostly happen for cases like in the screenshot, where a smaller geometry (triangle) is included in a bigger polygon, and intersects the latter partially (with one side).

no_boundary.gh (10.0 KB)

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4140

Trending Articles