How To Interpret a Text as a DC Formula
-
It sounds as if you could simplify the functions by using a better placed axis of rotation. Can you share the model?
-
yes @Jim. for sure.
activate the INTERACT mode, open and close the cabinet door and see what happens to the door.
-
Are you really using SketchUp 7 as it says on yout profile?
-
Anyhow, the point I and TIG are trying to make is that you can have a single animation attribute, but can use that attribute in any of the position and rotation attributes to obtain simultaneous animations.
Quick example: This would animate 90 degress around the Z axis, while at the same time moving along the X axis from 1 to 3. Does that help?
-
I'm using SketchUp 8.011752
-
@Jim and @TIG. I understood the changes you did but I'll come back to the same problem: X axis will lose the formula =Cabinet!X+Door!door_gap, useful for the dynamic resize. I want to kill 2 birds with one stone: I want to have a dynamic resize along with open/close door animation.
you might have noticed that when I rotate the door right after I have to move back the door in the X coordinate, otherwise, the door will be touching the other door of the beside cabinet, when both are open.
when opening/closing the door, X axis receives numeric values, losing the formula. when resizing the cabinet, X axis should have the formula back, in order to do the resize properly.
thanks.
-
but you both gave me a very good idea that might be the solution and I'll try it right after the coffee. I will write the formula Cabinet!X + anim in the X axis field. the custom variable anim will receive the numeric value coming from one of the two formulas written in the ANIMATE function.
ANIMATE function in turn will have the two formulas: Door!door_gap and Door!door_gap+MDF_thickness, for instance.
what do you think?
-
-
Here is what I mean.
The "anim" attribute moves smoothly between 0 and 1. We use the basic math properties that
0 × N == 0 1 × N == N
where N is any number.
So then for any translation or rotation or scale the formula is:
start_position + anim * travel_distance
or for a rotation:
start_angle + anim * travel_angle
Think in terms of start position and travel amount. When "anim" is 0 you get the start position. When "anim" reaches 1 you get the start_position + travel_amount.
The main advantage of all this is that you can use the "anim" attribute in any of the position, rotation, or size attributes to get multiple, simultaneous animations. Plus it actually simplifies the formulas once you get your head around it. You can also use the "anim" attribute to drive animations in other components in your DC.
Perhaps the 2nd image will help clarify.
-
that's right @Jim. you are an expert! now I'm uploading the final version of the cabinet project, with 2 doors working, as it really should be.
thanks.
SketchUcation - Cabinet 2 Doors - Dynamic Resize & Open-Close Doors.skp
Advertisement