Unexpected Vertice Order from DeBrep.gh (27.9 KB)
I can not fully understand your problem.
When I test with a newly created surface, all things are normal. So there is no bug here.
Your brep somehow has multiple faces with “reverse=1” attribute, (you can explode brep and use “list” command)
I am not sure how your brep is created, so in the GH file I recreated the brep and that fixt the reverse=1 problem.
your GH file has 3rd party plugin and I am not able to fully understand your problem.
so please check the file and see if problem goes away.
[what is reverse=1]
if X is to your right side and Y is to your front side.
Then Z must be the sky, right?
This is a normal axis system, and the same goes with surface UV direction and surface Direction.
if a surface U direction is to your right, surface V direction is to your front, then the surface normal direction (or surface direction) must be up (to the sky).
For a normally created surface, this is always the case.
but when you do something special such as ‘mirror’
that rule kind of “temporarily broken”.
Also when this brep/surface is not created by rhino, this might happen.
Assume you did a mirror to your surface.
mirror the surface to your left/right side.
the new surface U direction becomes “to your left”
because the mirror action only mirrors the U direction
V direction still the same.
in this case, if the U-V-DIR relationship still remain the same, the newly created surface normal direction should be pointing toward ground.
but no, Rhino does not do that, because a user just mirror a surface and Rhino assume this user does not intend to actually change the surface direction by mirror.
in this case the newly created mirror surface is like this:
U direction to left
V direction to front
Normal direction still to the sky.
that kind of break the rule, right? so rhino gives the surface a special flag, named “reverse=1” (for normal surface, reverse=0). The U-V-DIR relationship is abnormal but rhino accept this for user convenience, and secretly rhino just added a flag to this surface.