Transformation in scale
-
Can a transformation in scale be performed on a definition?
Where
tis 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, repeatI thought the first line above creates
my_definitionof 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_definitionHave 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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement