sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Creating rotating dynamic components

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    7 Posts 5 Posters 9.7k Views 5 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
      minusthetoast
      last edited by

      I have some doors on a house I'm designing, and I want them to rotate around the z-axis at the center of the door, like a revolving door. I know how to make the component rotate but it's always rotating about the edge of the component, how do I get it to rotate about the center?

      Also, I was wondering if it's possible to create compound animations where you click once and something happens, then you click a second time, and something different happens, and the third click sends it back to the start. For instance, if my first click rotated the door, and then the second click slid it to the left 5 feet. Any help would be greatly appreciated thanks.

      1 Reply Last reply Reply Quote 0
      • R Offline
        remus
        last edited by

        You can change the centre of rotation by moving the component axes (right click component->change axes.)

        http://remusrendering.wordpress.com/

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

          @minusthetoast said:

          Also, I was wondering if it's possible to create compound animations where you click once and something happens, then you click a second time, and something different happens, and the third click sends it back to the start. For instance, if my first click rotated the door, and then the second click slid it to the left 5 feet. Any help would be greatly appreciated thanks.

          Yes you can do that! It is a little tricky, but once you get the hang of it, its pretty straightforward.

          The idea is that you can put in an animation value like this:

          X - =if(animate_me<0,animate_me)

          ROTZ - =if(animate_me>0,animate_me/2)

          OnClick - ANIMATESLOW("animate_me",-100,0,100,0)

          Using the if makes the X or ROTZ only animate when the animate_me attribute is within the right range. And this is a very basic setup. To get things to move the precisely right distance and to rotate the precise right amount, you will need to get more complex. But here's a simple example. Lets say I want the drawrer to slide out 10" and the rotation to be 90 degrees. You could use these values:

          OnClick - ANIMATESLOW("animate_me",-10,0,90,0)

          X - =if(animate_me<0,animate_me)

          ROTZ - =if(animate_me>0,animate_me)

          So in that example I changed the OnCick values to equal the values I wanted animated.

          Anyhow, I think that makes sense, right? The trick lies in the If statements making the animation only occur sometimes if certain conditions are being met.

          Chris


          multi-stage onclick.skp

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

          1 Reply Last reply Reply Quote 0
          • M Offline
            minusthetoast
            last edited by

            Oh ok I see what you mean. Do you think you could give me a little bit of a walkthrough for how to write in the formulas so the animations occur in the correct order? I'm a little new to animating dynamic components. By the way, I'm an architecture major at Calpoly SLO 😄

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

              Sure, I'll give it a quick go.

              OnClick - Animate("animate_me",-90,0,60,0)

              ROTZ - =if(animate_me<0,animate_me)

              X- =if(animate_me>0,-(animate_me))

              Notice that in the X field I have the anmiate_me attribute wrapped in -(anmiate_me) (the negative sign and parentheses). That is because the value is 0 to 60, which move the door to thr right. But I wanted left, so I wrapped it in those parentheses and said that I wanted the opposite of animate_me, which is 0 to -60, which moves the door to the left.

              So that should solve it. Let me know if I missed anything or if it doesn't make sense,

              Chris


              door swing and move.skp

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

              1 Reply Last reply Reply Quote 0
              • J Offline
                jamronlol
                last edited by

                Chris, thanks. I'm currently making a bus with a ramp and your formula worked!

                I had to figure out that I had to invert the X and RotZ formulas to make it work!


                Rampsystem.skp

                1 Reply Last reply Reply Quote 0
                • A Offline
                  Alanwhughes
                  last edited by

                  This is almost what I've been looking for !

                  I need a window to first tilt (Red or green axis), then return closed, and on the next couple of clicks, turn on the Blue axis, and then close and repeat.. can you help me?

                  Cheers,al

                  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