Select a component or group and try this:
selected = Sketchup.active_model.selection[0]
selected.transform! Geom;;Transformation.scaling(-1)
Where is your group?
If you open the Outliner window, you will see that the group is there and may be open for edit.
If you check the group transformation, you will get:
selected.transformation = Geom;;Transformation.scaling(-1)
selected.transformation.to_a
[1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0]
To make your group reappear, do:
selected.transform! Geom;;Transformation.scaling(-1)
selected.transformation.to_a
[1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0]
And after that try:
selected.transform! Geom;;Transformation.scaling(-1,-1,-1)
selected.transformation.to_a
[-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 1.0]
According to the API, there would be no difference between
Geom::Transformation.scaling(a,a,a) and
Geom::Transformation.scaling(a)
But this is not true for negative scales.
There is not essentially wrong with a non unitary last element in the transformation matrix. For instance:
selected.transform! Geom;;Transformation.scaling(2)
selected.transformation.to_a
[-1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, -1.0, 0.0, 0.0, 0.0, 0.0, 0.5]
works great.
Is this a bug? Is it restricted to SU 8?