Transformation in scale
-
Can a transformation in scale be performed on a definition?
Where
t
is a transformation making a bunch of entities 12 times bigger:#this enlarges my_instance my_definition = my_instance.transform!(t).definition repeat = false #this remains at the original size model.place_component my_definition, repeat
I thought the first line above creates
my_definition
of the transformedmy_instance
, but it doesn't. How do I change the size of my_definition?
-
#this enlarges my_instance my_definition = my_instance.definition my_definition.entities.transform!(t)
-
Attached error message with the example:
my_definition = my_instance.definition my_definition.entities.transform!(t)
I looked up entities, and tried the following. It runs, but without transformation to my_definition.my_definition = my_instance.definition my_definition.entities.transform_entities (t,my_instance) model.place_component my_definition
Have been working on this off and on, for a couple of days. Something else must be going on????
-
To scale a definition, I think you have to scale its entities. The definition has to be at scale 1.0 I would guess. So to get it to be larger, scale all its entities.
-
Sorry - posted in a rush - but you very nearly got there.
my_definition.entities.transform_entities(t,my_definition.entities)
(Avoid spaces between the methods name and the brackets)
-
tt, and cf, Thanks. Got it to work as follows:
my_definition.entities.transform_entities(t,my_definition.entities.to_a)
Off and on for 4 days, this has got to be the longest time I've spent getting a single line of code right. Hopefully I'm getting better.
Advertisement