Sorting of surfaces in closed polysurfaces

Hello Guys

I’m working on the details
and often I need to mark the face surfaces of a closed polysolid with a layer layout
I do it manually in a rhinoceros
I tried to write an algorithm for such sorting by XYZ by the coordinates of the centers of these surfaces
But it turns out not very much because the details I may have are different

I would like to know if it is possible to automate such a process?

I’ve seen several plugins for sorting surfaces, but they all work by center coordinates and areas - this is a simple approach

Hi,

could elaborate a bit on how you want to sort? Maybe it’s just me, but I did not clearly understand.

You can sort planar surfaces by using its center normal vector. With the computation of the dot product, you can determine if a given normal is roughly aligned with a given vector. This allows you to filter for e.g. top surfaces… Is this what you are after?

1 Like

in the attached rhino file, there are objects sorted by layers
in the same way, you need to lay them out in layers, but not with your hands, but with the help of a grasshopper

I did the sorting, but it just sorts by the coordinates of the centers if the part is a little different or there are a lot of faces, it does not work.

please tell me about the methods that you described, maybe I don’t know them…

what is the rule of thumb you use when you separate the object in layers manueally in Rhino?

this separates the surfaces in branches, one branch per layer to be baked:

Sort Surface_Re.gh (11.7 KB)

at this point you can use any plugin you want (Human, Elefront…) to bake object on layers that are created simultaneously with the names you want

1 Like

Hello
thank you very much for the answer
rule of thumb is something like this
the result of his work can be seen on the layers

all vertical faces from the X axis along the circle are sorted into groups
groups are distributed in the following way, the faces are one group and, in descending order, a layer is assigned with a step of 20 by number
garni between faces with holes the same but with different names and numbers
upper and lower in separate groups

The problem is that all such details are different for me
for example, faces with holes can be from 2 to 8

there are no problems with uploading to layers, I also use these plugins, it is the problem of sorting

I understand correctly that this method is based on grouping faces along normals? and if the normals are different and the faces do not lie in the same plane?

yes, that definition should group the Surfaces exactly as you described, but there’s no sorting implemented at all

I think scripting using brep topology would be the best and easiest solution, but I don’t have (yet, hopefully…) the knowledge to do it myself

the basic steps would be to identify first which are the planar circular faces recognizable as the “bottom of the holes”, these ones:

if their normal points +Z or -Z then their connected face belong to the top/bottom (R_something):

if their normal is not along +/- Z then their connected face is a G**5

then you “grow” the selection again, and you’ll find the G**0

top and bottom faces (R***) are easier to isolate as a whole thing

would you mind uploading one of the most cancered shape with even 8 holes? I’d be curious to see and try something on that

1 Like

Inno
I can load the 6-beam part, it is at hand now I sort these edges by color with my hands
like in this file for example
I will be very grateful for help

this sirty sketch just filters the features into: vertical holes (which appear to be on bottom only?), bottom surfaces, top surfaces, holes on sides, planar side srfs with holes, planar side surfaces without holes

it works based on surface normals, so you’ll need a closed Brep as input
there are two sliders you can play with to increase or reduce the min/max angles normals make with Z vector to define what is “up” and what is “down” (this probably is not the best way…)

faces are categorized by indice, so once you have that it becomes pretty easy to bake them on separate layers with different names (I’d go Elefront / Human for that)

about the naming convention indeed, sorry but I was not able to understand the rules you want to use… anyway with some Concat and Serie you’ll get whatever you want

weird stuff.gh (18.6 KB)

I assume the one you posted is the most complex case… if you find some models on which the filtering does not work correctly I’d be curious to see what’s going wrong

1 Like