I’ve created and used Ruby extensions successfully for a while, but have run into a situation that is perplexing me…
I generate an object consisting of faces and lines. These faces and lines grouped e.g.
model = Sketchup.active_model entities = model.active_entities line = entities.add_line ordered_line_coordinates group = entities.add_group line
this works well. I now want to rotate this via:
model = Sketchup.active_model.active_entities model_origin = model.transformation.origin tr = Geom::Transformation.rotation( model_origin, 'x', 45 ) model.transform!( tr )
This does not work. I get the following error:
Error: #<NoMethodError: undefined methodtransformation’ for nil:NilClass>`
I’m obviously doing something wrong, but having a hard time figuring out what. I want, really, to rotate the group
I’ve been adding to, but I’m not sure how to retrieve that with active_model.