Orientate planes: get halfway direction among the normals of 2 consecutive surfaces

vector
grasshopper
orient
unhandled

(Huskenazy) #1

Hi all.
I have a curve panelized surface. I have the points of the intersection among panels, and i have the planes of the surfaces.
Now, I want the connections for each point.
the idea is to put a box for each point, and orient each box in the normal direction to the planes of each surface. and until here its ok more or less.
The question is:
in the edge among two consecutive surfaces i can’t use exactly the same plane of the surface, but a plane whose normal direction is halfway between the normal directions of the planes of the 2 consecutive surfaces.
look at these images

  1. same direction of the plane

  1. normal direction halfway between the normal direction of the 2 consecutive surfaces

I would like to get the result of the second image, for all the surfaces.
I post the definition with my attempts, so I hope is clearer.
planes_1.gh (221.2 KB)

Thanks in advance!


(Tim Stark) #2

Maybe I get your question wrong, but don’t you have them already? The purple group in the bottom. There are all “average” planes on the bottem curve or not?


(Arqmorelos1) #3

Ok so your ‘‘boxes’’ would actually represent your nodes, there are a few ways to do this. but for all of them you would need connectivity information of your wireframe/mesh, i.e. Which panels lie on each of the nodes, so then you can average all of the panels normals connected to each node an then get your node normal this way. You can also weight each of the normals according to the area, there are some other criteria to do this.

You can use sandbox to get some basic connectivity trees and work your way up from there, Its also possible to do something with very basic code and native GH components for more complex surfaces. A simple way is just make a mesh and deconstruct it and you will get some vectors at each of the nodes with basic gh components, though I’m not exactly sure how it works I think it will give you something pretty close to what you’re looking for, which i think for academic purposes or simple single curvature surfaces are good enough and easier to digest. Please find attached a very quick, easy and simple solution, though not optimal

planes_1#simple.gh (218.7 KB)


(David S. Mavrov) #4

Arqmorelos1

These are wrong because there are small segments. It is the same with the curves on top of the brep. If we manage to get rid of the small segments, your method is perfect.


(Huskenazy) #5

Hi @tim.stark. Yes, the idea is that in the purple group, but there are some errors there. im trying to troubleshoot it and i’ll post!


(Arqmorelos1) #6

Yep, you’re right David, I’m pretty sure that’s it!, this is easily solved when you have the original surface or take some time to rebuild the mesh/ panels / or wireframe.
As you suggest getting rid of the small segments would be an appropriate criteria for this specific thing, specially when only looking to get the orientation plane for the nodes. I was just trying to point in the right direction while also mentioning that there are other ways to do it depending on what you’re after and the geometry to analyze.


(Huskenazy) #7

Hi,
surely there are many methods to do it!
Anyway i updated the original definition and i’ve almost solved i think.
planes_2.gh (415.1 KB)
@tim.stark

the thing i wanna solve here it’s this.
Look at this:
red=originals planes’ normals
blue=consecutive planes’ normals
green=oriented planes’ normals

if i zoom, you can see the problem:

i want the green vector is always in the middle between the 2 vectors red and blue. i think in this case the problem is the verse of rotation.


(Michael Pryor) #8

Just average the red and blue.

planes_Average.gh (421.8 KB)


(Huskenazy) #9

aaa wow ! I look at it right away
@Michael_Pryor thanks


(Huskenazy) #10

Solved!
thank you all for the Interventions.
@tim.stark @arqmorelos1 @davidsmavrov @Michael_Pryor
planes_3_solved!.gh (228.2 KB)