This is what I use
# Let 'point' be the new insertion point of the component.
# Let vector=ORIGIN.point.vector_to(point)
# Let tr=Geom;;Transformation.translation(vector)
vector = component.transformation.origin.vector_to(new_origin)
tr = Geom;;Transformation.translation(vector)
component.definition.entities.transform_entities(tr.inverse, component.definition.entities.to_a)
# All of the component's innards jump to suit, so the instance is now in the wrong place relative to its container's contents...
# To fix any instances so the contents are placed back as they were, inside their individual container...
component.definition.instances.each{ |inst| inst.transform!(tr) }
component.definition.invalidate_bounds