Finding cells in a set of lines

image

I have a series of lines (shown)
and the intersection points (also shown)

All the lines are in 1 list and all the points are in another list.

How do I work out area of the enclosed areas without explicitly telling the computer which points + lines enclose A and which lines and points enclose B.

Suggestions please :slight_smile:

Hi @Alien is it something here you are after it will give you 2 closed loop

4 Likes

What package is the curves shatter from?

this one is from ampersand and polycurve is the same…polycurve simplify is from sparrow all written in designscript/python

2 Likes

Thanks, I’ll have a look :slight_smile:

yeps try it :wink:

Hi
You can use Revit’s automatic parts algorithm too :wink:

Sincerely
christian.stan

1 Like

Hi Christian is that separationline then, dont think we can use detail and modelline as separation, i cant …

but we can just create the separation and create the room as well if we want in same run

1 Like

This was the route I would have gone, though entirely Python based as I wouldn’t want anything other than my geometry in the memory. My map was:
m

  1. Start a new transaction group
  2. Make a new level at 10 units above/below the min/max point of the project,
  3. Generate new room separation lines on that level
  4. Get the plan topology for the new level
  5. Create new rooms at the topology
  6. Regenerate the document
  7. Get the new room’s boundary loops, convert to Dynamo curves, make polycurves, and generate surfaces
  8. Roll back the transaction group
  9. Return the surfaces to Dynamo
3 Likes

Also look:
(572) Topologic Closed Circuits in Dynamo (ft. Wassim Jabi, 1 of 2) - YouTube

3 Likes

Did I mention those are lines in Dynamo… And the points are just the intersections (I made another post about this one because my code wasn’t removing the lines (it does now)).

I was hoping for a mathematical solution rather than a , “translate to Revit, create stuff” solution (hence the original post name :stuck_out_tongue: ).

This is my list of curves:

Curve(StartPoint = Point(X = -8171.266, Y = 2648.234, Z = 4000.000), EndPoint = Point(X = 603.734, Y = 2648.234, Z = 4000.000))
Curve(StartPoint = Point(X = -7371.266, Y = -4901.766, Z = 4000.000), EndPoint = Point(X = -7371.266, Y = 3098.234, Z = 4000.000))
Curve(StartPoint = Point(X = 4478.734, Y = -4101.766, Z = 4000.000), EndPoint = Point(X = -7821.266, Y = -4101.766, Z = 4000.000))
Curve(StartPoint = Point(X = 3678.734, Y = 5698.234, Z = 4000.000), EndPoint = Point(X = 3678.734, Y = -4551.766, Z = 4000.000))
Curve(StartPoint = Point(X = 878.734, Y = 3448.234, Z = 4000.000), EndPoint = Point(X = 878.734, Y = -4551.766, Z = 4000.000))
Curve(StartPoint = Point(X = -546.266, Y = 1848.234, Z = 4000.000), EndPoint = Point(X = -546.266, Y = 6048.234, Z = 4000.000))
Curve(StartPoint = Point(X = -996.266, Y = 5248.234, Z = 4000.000), EndPoint = Point(X = 4478.734, Y = 5248.234, Z = 4000.000))
Curve(StartPoint = Point(X = -996.266, Y = 2648.234, Z = 4000.000), EndPoint = Point(X = 1328.734, Y = 2648.234, Z = 4000.000))

And it didn’t work at all.

I guess it’s because the curves extend past the intersect point?

1 Like

Goddag @Alien hmm not sure could you share the rvt you try on…so we can see whats fail ? and keep in mind it want work in some situaton

The curves are Dynamo curves in Dynamo.

It only picks up the rectangle not the ‘L’ shape.

What packages is the polycurve.Simplify from?

This is with these curves:
Curve(StartPoint = Point(X = -7871.266, Y = 2648.234, Z = 4000.000), EndPoint = Point(X = 303.734, Y = 2648.234, Z = 4000.000))
Curve(StartPoint = Point(X = -7371.266, Y = -4601.766, Z = 4000.000), EndPoint = Point(X = -7371.266, Y = 2798.234, Z = 4000.000))
Curve(StartPoint = Point(X = 4178.734, Y = -4101.766, Z = 4000.000), EndPoint = Point(X = -7521.266, Y = -4101.766, Z = 4000.000))
Curve(StartPoint = Point(X = 3678.734, Y = 5398.234, Z = 4000.000), EndPoint = Point(X = 3678.734, Y = -4251.766, Z = 4000.000))
Curve(StartPoint = Point(X = 878.734, Y = 3148.234, Z = 4000.000), EndPoint = Point(X = 878.734, Y = -4251.766, Z = 4000.000))
Curve(StartPoint = Point(X = -546.266, Y = 2148.234, Z = 4000.000), EndPoint = Point(X = -546.266, Y = 5748.234, Z = 4000.000))
Curve(StartPoint = Point(X = -696.266, Y = 5248.234, Z = 4000.000), EndPoint = Point(X = 4178.734, Y = 5248.234, Z = 4000.000))
Curve(StartPoint = Point(X = -696.266, Y = 2648.234, Z = 4000.000), EndPoint = Point(X = 1028.734, Y = 2648.234, Z = 4000.000))

sparrow

1 Like

Its hard to say…i will need the file for test…

Cells.dyn (33.0 KB)

1 Like

i mean the rvt :wink: with lines

They aren’t Revit lines.

I’ve extracted them from intersections of planes and edges

arhhh I see :wink: