Well, I’m one step further now. After a second search of the forum, I found this topic and this post in it:
Transform geometry within comonent or sub-components - #6 by TIG.
That gave me enough clues to simplify it for one component definition only to one line:
text_component.definition.entities.transform_entities(array_rotate,
text_component.definition.entities.to_a)
This is the placed component, with the internal entries rotated to 45° as asked for with the slope_angle
set to 45°.
The elements of the component definition have been rotated inside the component definition, but the bounding box no longer fits the entities closely.
Next step - how to redefine the bounding box in code so it looks like this (image created after using the user interface and Change Axes for the component).
Will try a little longer tonight, but if it’s difficult, may have to wait until tomorrow.
[LATER]
If I have both a slope_angle
and an opposite text rotation_angle
set, I get an odd bounding box, which doesn’t even contain the text elements:
And I’ve searched the forum for how to change a component’s axes using Ruby, and can’t find anything helpful yet.
Any suggestions, please?