I used sporph to orient a mesh onto box surfaces today and noticed an inconsistency in the surface direction on boxes.
The Grasshopper definition contains five inputs:
The first box is created in Rhino with the following command:
Command: _Box
First corner of base ( Diagonal 3Point Vertical Center ): Diagonal
First corner ( Cube ): Cube
First corner: 0
Second corner: 100,100,100
The six surface normals all point towards the outside but the curve orientation seems off for the underside of the box. The sporph component places all meshes correctly except the one where the curve direction is ‘1’.
I’m expecting the curve direction to be ‘-1’ for a surface when looked at it from the front side.
Both the Grasshopper box and bot 2pt components create surfaces with confusing curve directions but the result of the sporph is correct.
The surface normals are correctly evaluated for all surfaces and the offset curves are also offset in the right direction.
The only time the curve directions match my expectation is when I extract the face boundaries from an undivided mesh box with six faces. The mesh box is also the only object where the curve seam of a face is consistently in the second quadrant / left-top side region of the surface frame.
I’m confused and it seems something is off for how the boxes are deconstructed and the curves are derived.
Unless I’ve overlooked something, the results seems to be identical in Rhino 8 WIP.
The script changes the brep which is a duplicate of that on the Selected Object.
So you would need to Replace the brep geometry on that rhino object in the file.
My examples were just that, examples to show the face orientation reversal.
A better option is to create a GH python script to fix input.
Does this help: standardize_brep_faces.gh (5.5 KB)
Hi Willem, thanks for the script. I added it to my definition but it doesn’t seem to do anything helpful.
While breps.out shows one face was flipped, it does not have any effect on the sporph component, curve direction or evaluate surface. The bottom side still is the odd face with the curve direction 1 and all other faces have curve direction -1.
Shouldn’t a standard box have all faces with curve direction -1?
Actually I think every closed brep should have all faces with curve direction -1.
Thank you @kev.r this is interesting. I added your scripts to my file and even the curve seam is consistent in the third quadrant / bottom-left side region of the surface frame.
Now we have a solution to the problem but once again I believe the normals of a regular extrusion are messed up and I think this should be fixed in the source code or wherever it is set. I’m fine analysing surface normals and curve sides after some random deconstruction and rebuilding of arbitrarily oriented surfaces but the problem here is at the very start of a standard geometry.