Geometry translate along its centroidal axis

Hi all,

I want to translate my geometry or element along its centroidal axis (geometry got rotated by an angle 30 degree). I want to find out the centroidal axis of the geometry and give geometry translate along that rotated axis of the geometry by 300mm or -300mm. Please let me know

Hello @shashank.baganeACM ,

I don’t understand the complete problem statement, but yes you can move the column along new grid lines. i have created the script for your reference, in the script i am trying to move the column along X axis at 30 Degree and 300 distance.
similarly you can do for Y - axis, if required

If you want to move the Element along one of the local axes relative to the Element, then use FamilyInstance.FacingOrientation node to get the angle relative to the global Y axis (I assume in your case this is 30 degrees). This will give you back a normalised vector that represents the angle of rotation.

Here is an example to move the Element along the Local Y axis…

And one to move along local X axis (same as above, but using cross product of Facing Orientation and Z axis to get X axis)…

Element.Location+ is from the clockwork package. The rest are OOTB nodes.

3 Likes