How to move entity in local axis

Please Read:
[How to] Post correctly formatted and colorized code on the forum?

model = Sketchup.active_model
sel = model.selection[0]
tr = Geom::Transformation.translation([50,0,0])

sel.transform!(tr)

There is also a trick that the #transform! methods take objects that can be coerced into a transformation, like an array with 3 numeric elements. Ie …

sel.transform!([50,0,0])
2 Likes