

Op 922024 om 14:24 schreef Bald Eagle:
> The other thing that might not be immediately obvious, but will help in the
> overall understanding of the macro's general use is that you only need to
> identify 3 points in/on an object in order to line it up with another
> instantiation of itself.
>
> Anything. Triangles, cubes, meshes, parametrics, splines, point clouds, or even
> entire included scenes.
>
Yes, that is the fantastical approach of the macro. And it is so easy in
use!
> Let's say you're modeling something in pieces, and you have a spot on a CSG
> object where you need to place the next piece. It needs to fit in some specific
> alignment, but it's always easier to model things near the origin, lying flat on
> a plane, etc.
>
> What you can do is take the points on the csg object that you modeled, and
> concatenate all of the transforms that you used to put the object containing
> that point where it currently is. Apply that transform to an <x, y, z> vector
> using vtransform, and you have the exact coordinates of those points.
>
> Now you can take one of those points and place it on the origin, and either with
> math or macros arrange the other two points to lie flat on the plane. Get those
> 3 coordinates.
>
> Knowing that the triangle on the plane will now fit perfectly into/onto your csg
> object, you can model your piece, and then use Reorient_Triangle to just move it
> where it needs to go.
>
> Likely we could use a macro that will just grab that csg triangle and move it to
> the plane at the origin and return the 3 coordinates as a tuple.
>
I had not yet thought that far, but that would be a logical use of the
macro. Something to experiment with. It might solve some issues I was
struggling with in my LogoPlanet scene recently.

Thomas
Post a reply to this message

