Division into zones

Hi

How can I find marked rectangles (I need to find them also in perpendicular direction) so I get all 4 lines of rectangle in one branch? I want to do it in XY plane (don’t care about Z- it can be at the either face)

Slab.3dm (117.2 KB)
Slab.gh (6.2 KB)

Geometry is internalized, no need for Rhino file.



Slab_2024Oct1a.gh (38.2 KB)

Damn. Sniped again.

Go ahead and post your solution?


Slab_2024Oct1b.gh (31.3 KB)

1 Like

Yes, I’m… still working on it.

So the path I chose was to split the surface on the basis of UV lines:


Slab 01.gh (22.5 KB)

OK, that’s fine, but…

  1. I believe you want ‘V’ lines instead of ‘U’ lines :question:

  2. And that code is way more complicated than needed :bangbang:


Slab_2024Oct1c.gh (15.9 KB)

And there are twice as many lines as you need; 12 instead of 6. But the result is the same.

1 Like

The way I understood the original post, the user wanted both, just not in the “Z” direction, however he imagined that being done.

That is how I felt when creating this part of the script:

What this part of this script however does is remove these type of lines:

an issue, if I see correctly, which has not been addressed in any of the scripts you have posted so far.

Yes. This is because feeding the vertices of the face to Surface Closest Point is like providing it with both the start and endpoints of the face edges in the desired U or V direction. I briefly considered giving Surface Closest Point the midpoints of the edges of the face instead of the vertices:

but this does not reduce the number of items in the list of iso-lines or guarentee a unique set. Unfortunately, Create Set does not work on geometry, only primitive data types. Removing the duplicates from the list would require filtering the face edges by direction (Edges by direction) and getting either just the start or endpoints of these lines for Surface Closest Point. This seemed like more trouble than it was worth, given that spliting the face by doubled set of splitting curves will still yield the correct result.


Slab 02.gh (49.2 KB)

This is what the whole ordeal looks like if you want to be able to chose between X-direction, Y-direction, or both. Obviously, this could be simplified with the use of a cluster. I went through the effort of eliminating the doubled UV lines.

1 Like

I didn’t understand some of his text (“so I get all 4 lines of rectangle in one branch?”) so ignored it and looked only at his image with vertical lines (‘V’). I didn’t see the stray horizontal line you want to avoid.

I assume he just wants the perimeter of the rectangles broken down into lines.

It occurs in the other direction only because of the way the face is shaped.

Hi

Thank you guys for help! Both solutions seem to work fine :slight_smile: