Hi Grasshoppers
Still in my infancy with GH, but trying to make little usefull things. I’ve got these imported trees where the mapping is all screwed. Trying to automate applying the mapping to each individual mesh face (which works), but I’m now stuck on getting the orientation right. All of the cherries are supposed to be hanging, but as you can see, only one of the faces have the right orientation.
Hi @Joseph_Oster
Is the screengrab to indicate that I’m not allowed to use plugins in Grashopper and then ask questions on the forum - or should I have listed the plugins used in the original post? As mentioned, I’m not a very seasoned GH user, so beg my pardon if I overstepped the GH Discourse super user ruleset.
-Jakob
For the occasion you need mapping to Planes derived from Mesh Vertices or from Mesh Face Centers (where Plane Z is the global Z). In order to do it you should compare any Vector3d angle (a Normal, a ref Vector (say: Global positive Z)) then get the filtered Vertices, then define mapping Planes and then Orient your things FROM Plane.WorldXY (the standard way) TO any mapping Plane.
Used a little code in the attached (Components are not my game at all):
Other than that … this is not the way to do it: for real-time speed (and lot’s of other reasons) you should map Instance Definitions since we are talking about the same objects (and/or some optional Trasformations [Scale, Rotate etc]). That way you can finish the job in a couple of milliseconds with, say, 1-2K “complex” Instances. But this is more or less outside your envelope at present time.
Mastermind a way to visualize the Normals, thus to have a clue about the suitable min/max angles to use.
Get what the little C# does and replace it with native Components.
Implement some Transformations (like Rotate) more and/or a Random policy to apply them.
Use more Groups of things to map and sample the candidate objects via some optional Random way
Replace the Mesh with some Graph (say a “tree” like for the occasion).
As a challenge … since you operate in the Industrial Design sector … think the most absurd/complex installation imaginable … and we’ll see ways to make the impossible very easy.