Retrieve closed Boundaries between multiple intersecting lines

Hi Guys, I am trying to retrieve the polygons or triangle between the intersecting lines

kindly find the image for better understanding

\

do anyone have logic or nodes?

Thanks in Advance

1 Like

@dineshsubramani , hi

i think there are smoother ways… :wink: they are more geometric based!


1 Like

Hi Anders, Thanks for the Response but what iam expecting is a node or a python code which works generic for any number of lines or polygons the shown image is just as example

Hi @Vikram_Subbaiah do you have any ideas to do this

  1. Get the bounding box that encloses all lines (or maybe intersecting points.
  2. Create a base surface corresponding to the bounding box
  3. Extrude all lines to create surfaces and combine to create a polysurface
  4. Use the polysurface as a cutting tool and split the base surface into multiple segments
  5. Filter out the peripheral segments
5 Likes

Hi Vikram, Thanks for the Response , on mentioned procedure we retrieve many polygons which we dont require actually


the red marked polygons are the required and yellow marked need to be eliminated is there any options to do ?
Thanks in Advance

Filter out any polygons where all vertices don’t match line intersection points

3 Likes

@Vikram_Subbaiah ,hi


And how do you split it finally?

KR

Andreas

Hello i would try something…think its the same as Vikram suggest :wink:

2 Likes

If you have a surface containing all these polygons you could use the Geometry.DistanceTo node to determine the polygons distance to the perimetercurve. If the value isn’t 0 you know you have one of the inner polygons.

1 Like

@dineshsubramani ,
have a look: (467) Topologic Closed Circuits in Dynamo (ft. Wassim Jabi, 1 of 2) - YouTube

1 Like

Hi @dineshsubramani

I’ve worked out a solution for your problem. I found it intersting to solve and therefore had been busy with it for a while.

Input:

  • lines that cross eact other
  • the max number of vertices, this number should be as small as possible to reduce computational cost, because it uses a recursive function.

By now the script doens’t work when three lines cross each other at one point. Maybe I will fix this later.
In other cases it should work as shown below.

Notice, draw your lines on the same leve with elevation 0. The elevation can be adjusted when needed.

The python script can be obtained here

3 Likes

Hi Meychik,
Thank you so much for your Valuable time
i tried executing the program but i face some issues


can you please help

Hello, here is another approach, I don’t know if it is less greedy in computation time


(to be discarded if your “room” is completely enclosed, common point)
edit:
it’s good, seems to work even if well enclosed

Cordially
christian.stan

2 Likes

what version of revit do you use? It seems that you don’t have the library “copy” installed.

you can check out how to install some here

1 Like

Thanks I tried using in Dynamo2.9 it works
:slight_smile: Thanks Again for your valuable time

2 Likes

hello, you forgot the polysurface phase


I attached the note also to filter the outer surfaces
01 Novembre forum anglais.dyn (40.9 KB)

Cordially
christian.stan

2 Likes