I am generating a network surface based on various user inputs. Depending how the resulting curves are oriented the normal direction of the generated surface seems unpredictable, which means often that everything afterwards is happening out of sight on the wrong side.
Sortof if like the generated surface was a terrain and I wanted to populate it with trees, and need to figure out what side of the tree goes on what side of the terrain. Except the world is round and we’re in a square unit system, so you can’t use world Z+ or whatever to figure it out.
Right now I am just putting a flag out the “wrong” side so it’s obvious you need to go hit a toggle switch in GH to flip the surface.
I’m wondering how I would go about making this unnecessary 99% of the time. Logically I want to know where the perspective camera is and then determine the presumably expected normal direction based on the relative positions of the surface and the camera, i.e. make an assumption that the user wants to see the output on whatever side of the surface that they’ve got their camera on.
You should be able to rely on Z as a guide. So just make a planar surface somewhere which has its front face facing up. Use this planar surface as a guide surface in the flip component.
You could have a series of these planar surfaces, lets say 6, each representing the side of a cube, and use the appropriate face as a guide depending on the specific location of your object.
Maybe I’m missing something. I’m not following how having the guide surfaces help me figure out if the user is trying to generate a floor or a ceiling.
I think like BIM, your user should select if they are making a floor or ceiling, based on their selection, the appropriate reference surface would get used.
I work in boats and angles and faces and stuff are all freeform.
Have another approach on how to solve this that avoids the issue but I’d need some help in another direction on that one. I’ll start a new thread for that.
Maybe the simplest thing is to make a python script that updates a point at the camera position on a hidden layer. I could put the script in the idle processor so it updates the point every few seconds or whatever, then GH can pick up the point with Pipeline and I should be able to get faces the correct direction.