Folding beds with ladder staying vertically
-
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:
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
-
Should be able to do it using sin and cos functions, give me a sec and i'll hack something together.
-
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.
-
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
-
thanks, Remus and Chris, for the quick reply.
am currently away and without SketchUp. will check it out as soon as possible.
-
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?
-
@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 -
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.
Advertisement