Im feeling stupid again for something that seems simple but just wont work.
I want to explode a model away from a center - Geometry are 4 frames layered on XY and i want these pieces to move a distance away from the center.
Im sure im doing this the wrong way, I tried to find a simple way to do it but the points ID order change even after sorting them… Tried a second method but the mapping (move geometry from a to b of parts keeps just going wrong!
I drew arrows how they should move away from the center…
I could do this individually per block but feels like bad practice to do in GH… Do i have to create normals to the block’s plane (seems over kill again)… Thanks for enlightening this rusty geometric brain!
The Volume component returns a center point for each of your 4 breps. When you average them, you get a center point for the points. By subtracting if from the four center points of the breps, you get four vectors pointing from it to the brep center points. You want to normalize these vectors so that they have a magnitude of 1.0 and that you can then scale them to a desired length by multiplication. The vectors can then be used as transforms to move the breps. That’s it.
I used to be very, very bad at maths. Now I’m at least decent at computational geometry and maybe trigonometry, even matrices probably.
In my opinion that’s because beginners often try to start with something complex to do something even more complex, without even realizing it.
Oftentimes it is key to start small and simple, with a point, a vector, a plane, a line, or a polyline, before tackling the complex stuff like curves, meshes, and surface.
Above I wasn’t talking about normals to a surface or mesh face. A normalized vector is simply a three-dimensional vector of magnitude 1.0 in your example. It isn’t perpendicular to anything relevant here.