I remember a bug having to do with SketchUp’s idea of whether a transform was identity or not.
There was some operation which caused an identity transform to “lose” it’s identity. (pun intended, but yes there was a bug. Don’t know if it got fixed.)
ADD: Okay, I remember now. Using Steve’s 3rd example:
t3=Geom::Transformation.new([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])
#<Geom::Transformation:0x0000000fa57a58>
> t3.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
]
t3.identity?
#=> false
The #identity?()
method should return true
here, but obviously does not.
MORE …
t3 == IDENTITY
#=> false
t3.to_a == IDENTITY.to_a
#=> true
… strange. Reason is apparently the Geom::Transformation
class does not provide an overridden ==
method so “sameness” can be properly calculated. (It defaults to Object#==
.)