• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Instance Transformation Reference Issue

Scheduled Pinned Locked Moved Developers' Forum
4 Posts 2 Posters 484 Views 2 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.
  • M Offline
    MartinRinehart
    last edited by 24 May 2010, 19:25

    I give these two commands, expecting to move a component over the first five seconds and then move it back over the next 5 seconds.

    
    m comp, [20,20,30], 0, 5
    m comp, [-20,-20,-30], 5, 10
    
    

    The result, however, is that the second move command starts by placing the component back in its original position before beginning its move.

    Internally, these commands are placed on a stack. The first moves nicely, but it does this by replacing the instance's transformation reference. The second move references the same component, but it was nicely copied so it could keep its original transformation reference.

    I didn't copy it. Ruby did. I've been trying to get around this using Transformation.set!(), but so far without success. Any ideas for a clean solution? Or do I have to look through the stack, replacing, for each component, transformations with the latest?

    Making transformations easy is proving difficult.

    Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

    1 Reply Last reply Reply Quote 0
    • C Offline
      Chris Fullmer
      last edited by 24 May 2010, 19:56

      Once it has moved, it's transformation will have changed. You can just grab the new transformation to get its current location, and then you have to supply the new transformation of where its going to. It should be just like you did in step 1 to get it to move somewhere in the first place.

      Is Ruby doing something else?

      Chris

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

      1 Reply Last reply Reply Quote 0
      • M Offline
        MartinRinehart
        last edited by 25 May 2010, 16:54

        Problem is it moves with a new Transformation. I think I've got Transformation.set! mastered so I don't have to change TMs. Will know soon.

        Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

        1 Reply Last reply Reply Quote 0
        • C Offline
          Chris Fullmer
          last edited by 25 May 2010, 17:14

          TM's?

          Sometimes its painful to help when I have to ask more questions about your jargon than about your sript issues 👊

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

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

          Advertisement