Create floor with Grids

I need to create a floor from an existing grid, how can I get curveloop from grid


I think you’re going to have to do a lot of work to isolate those lines which are in rectangles, and to order them correctly so they make a loop.

You can sort and group the lines by their Direction, and their setout from 0,0.

Their is a great node in Ampersand called Geometry.SplitByTools which will recursively split your lines.

You can check whether a split line end point has an intersect, if not, filter out the line, because is not part of a rectangle (it’s one of those end pieces).

Then you have to logically group the lines into 4s… There is a node in springs called ‘subpairs’ which will help.

Here’s a start for you, hope it helps,


1 Like

@vanquyet9494 @Mark.Ackerley
It worked well, but my line-sorting is a mess…

RasterGridFloorCreation.dyn (105.1 KB)

Hope there is a easier way, i tried nearest point, sort by key, sort by function, vector.direction, nothing worked realy :frowning:

1 Like

hello, here is a script (the algorithm is bound to be improved, I’m a beginner)
I don’t know if it’s an imposed constraint that the slab edges are offset (in this case, offset on the polycurve, then recreation of the polycurve 2 nodes to add)
The mesh must necessarily be rectangular.

good day
Murs et dalles automatisés sur quadrillage_V2.dyn (190.9 KB)

It seems that adding the 2 extra nodes is more difficult than mentioned above

You have to take the 2nd possibility of floorByOutlineTypeandLevel and switch to long lacing

I attach the corresponding script
with a creation by rectangles rather than the previous script (by generated surfaces) I don’t know which one is more greedy in calculation time
Murs et dalles automatisés sur quadrillage_V3_modif.dyn (291.5 KB)

good day