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.
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.
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.