Hi Tim,
re:
> I did try adding the points back to the arrayed objects to have a point of reference
> for the rotations, but it didn't work, I suspect because the script is no longer seeing
> the result as a recently arrayed result?
If you tried this by deleting the line of code that removes the original points, yeah that won't work because you'll have an ordering of objects like:
Point
Point
Point
Obj
Obj
Obj
while these particular commands are expecting what you would get from an array which is arranged like:
Point
Obj
Point
Obj
Point
Obj
However, instead of keeping the original points it is possible to insert a new point, this can be done by adding in one strategic line of code.
Find the section of RotateArray.js that contains this code:
code:
if ( Obj.isPointObject )
{
// Point objects have a "pt" property that gets the x,y,z point. Get that
// as the rotation origin.
OriginPt = Obj.pt;
}
else
{
// Not a point object, add it to the object list to be rotated.
ObjectSet.addObject( Obj );
}
and then add in this line of code indicated with >>>> <<<< (without the actual >>>> <<<< characters):
code:
if ( Obj.isPointObject )
{
// Point objects have a "pt" property that gets the x,y,z point. Get that
// as the rotation origin.
OriginPt = Obj.pt;
>>>> ObjectSet.addObject( Obj ); <<<<
}
else
{
// Not a point object, add it to the object list to be rotated.
ObjectSet.addObject( Obj );
}
With that in place a new point object will be created in the ordering that ScaleArray is expecting and so you should then be able to run the results from RotateArray through ScaleArray additionally.
I'll see about making a more generalized "TransformArray" in the future, it would make it a little easier if I implement a helper for it in the core MoI code.
- Michael