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

    Folding beds with ladder staying vertically

    Scheduled Pinned Locked Moved Dynamic Components
    sketchup
    8 Posts 4 Posters 1.8k Views 4 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.
    • plot-parisP Offline
      plot-paris
      last edited by

      hello folks,

      haven't had much time to play with dynamic components. and so I don't seem to be able to work out the following situation for a dc:
      dyn_comp.jpg

      I have got two beds that can be folded to the wall to save space. a ladder is attached to both beds (lower corner) with two hinges. I wan't the dynamic component to animate the beds folding up when clicking them. that isn't too much of a problem (although I can only manage it that way, that if I click it and the beds fold up, they do so in every component placed in the scene. I guess it has something to do with global variables πŸ˜• ).
      but I just can't figure out how to make the ladder move up with the beds (like it is attached to the beds) whilst staying vertically. the ladder has to perform some sort of 1/4 circle movement in exactly the right speed.

      does anyone have an idea how to do this?

      cheers, plot-paris

      folding_beds.skp

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

        Should be able to do it using sin and cos functions, give me a sec and i'll hack something together.

        http://remusrendering.wordpress.com/

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

          Here you go.

          Its a bit rough, i had to use an 'if' to get it to move in the right distance. there must be a better way of doing it although my sleep deprived brain cant currently see it. It works, though.


          folding bed DC.skp

          http://remusrendering.wordpress.com/

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

            Interesting question indeed. I think its going to turn into a math exercise. I'm playing with it,

            Chris

            EDIT: Oh good, remus beat me to it πŸ˜„

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

            1 Reply Last reply Reply Quote 0
            • plot-parisP Offline
              plot-paris
              last edited by

              thanks, Remus and Chris, for the quick reply.

              am currently away and without SketchUp. will check it out as soon as possible. πŸ‘

              1 Reply Last reply Reply Quote 0
              • plot-parisP Offline
                plot-paris
                last edited by

                ok. finally I had the chance to have a look at your model, Remus. that is seriously cool, man! I tried to understand the maths behind it. but I just can't get my head around sin or cos functions (I am a very lazy bastard after all).
                there is a little tweak however, where the ladder isn't sticking to the beds. but never mind. this was more out of interest, nothing I desperately need.

                I have another question though: assume you want to plan a building. you have got the sizes of the rooms in square metres. therefore you create rectangles in SketchUp, matching the size. and now you want to be able to scale them in one direction while the DC is adjusting the length of the other direction to keep the same size of the rectangle.

                what I did now was to type into LenX the function**=**(lets say)200 (square metre) / LenY. it worked very well in this one direction.
                but when I apply the same function to the LenY variable, everything goes wrong; of course, because now there is now initial definition of the length of any of the rectangle's sides.

                did that make sense to you?

                1 Reply Last reply Reply Quote 0
                • AnssiA Offline
                  Anssi
                  last edited by

                  @plot-paris said:

                  ok. finally I had the chance to have a look at your model, Remus. that is seriously cool, man! I tried to understand the maths behind it. but I just can't get my head around sin or cos functions (I am a very lazy bastard after all).
                  there is a little tweak however, where the ladder isn't sticking to the beds. but never mind. this was more out of interest, nothing I desperately need.

                  I have another question though: assume you want to plan a building. you have got the sizes of the rooms in square metres. therefore you create rectangles in SketchUp, matching the size. and now you want to be able to scale them in one direction while the DC is adjusting the length of the other direction to keep the same size of the rectangle.

                  what I did now was to type into LenX the function**=**(lets say)200 (square metre) / LenY. it worked very well in this one direction.
                  but when I apply the same function to the LenY variable, everything goes wrong; of course, because now there is now initial definition of the length of any of the rectangle's sides.

                  did that make sense to you?

                  This is my first DC trial. Forgive the Finnish. It has an area attribute, and other attributes for an ID and a name. It would probably need refinement, and perhaps the third dimension should be added, with maybe a volume calculation too.

                  Anssi
                  huone.skp

                  securi adversus homines, securi adversus deos rem difficillimam adsecuti sunt, ut illis ne voto quidem opus esset

                  1 Reply Last reply Reply Quote 0
                  • plot-parisP Offline
                    plot-paris
                    last edited by

                    thanks Anssi. it seems to me though, that your Dynamic Component works if you scale it in only one direction. the other direction is unscalable. that was the problem I was fighting with. now we needed a way to implement the same behaviour to both sides. πŸ˜•

                    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