This method moves the axes of a definition.
def self.place_axes(definition, new_axes, adjust_instances = true)
definition.entities.transform_entities(
new_axes.inverse,
definition.entities.to_a
)
if adjust_instances
definition.instances.each do |instance|
instance.transformation *= new_axes
end
end
nil
end
You can use e.g. the bounds min point as origin to copy SketchUp’s behavior for groupign/component creation with the origin in the bottom front left corner.
transformation = Geom::Transformation.new(definition.bounds.min)