What does Entities.transform_by_vectors actually do?
-
http://code.google.com/apis/sketchup/docs/ourdoc/entities.html#transform_by_vectors
The manual doesn't help me much here... Anyone care to enlighten me? -
It makes your heart happy!
It transforms all given entities at once. So what? Try to move a series of edges/faces/vertices one at a time using the regular transformations. SU will automatically add geometry in between each transformation, delete faces on accident, re-orient things....it gets ugly quick!
transform_by_vectors treats the entire preocess as a single movement, so it doesn't add faces or anything until after the whole thing is over.
It works by giving it an array of entities to move and a corresponding array of vectors to move them by. That means each victor is in the direction of the move and is set to the correct length before running the transform_by_vectors method.
Its couterpart entities.transform_entities is also useful, but it only allows a single transformation object to be applied to all entities uniformly. So use transform_by_vector when you have lots of entities to transform simultaneously, using different transformations for each entitity.
Does that begin to explain it?
Chris
-
Yea I understand now. Think I'll add that entry to the request of updated API manual.
Thanks for the explanation. I'm sure I'll come in use soon.
..though, not what I hoped for... oh well.
-
Thanks for the info. Might come handy for an update of my align script.
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