sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    What does Entities.transform_by_vectors actually do?

    Scheduled Pinned Locked Moved Developers' Forum
    4 Posts 3 Posters 232 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • thomthomT Offline
      thomthom
      last edited by

      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?

      Thomas Thomassen β€” SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • Chris FullmerC Offline
        Chris Fullmer
        last edited by

        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

        Lately you've been tan, suspicious for the winter.
        All my Plugins I've written

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          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.

          Thomas Thomassen β€” SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • PixeroP Offline
            Pixero
            last edited by

            Thanks for the info. Might come handy for an update of my align script.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Buy SketchPlus
            Buy SUbD
            Buy WrapR
            Buy eBook
            Buy Modelur
            Buy Vertex Tools
            Buy SketchCuisine
            Buy FormFonts

            Advertisement