It will be great if you can see that the equipment you designed running even in a computer. You can find out lots of thing that can go wrong before hand. Actually, I guess that is the motto of the SketchUp. Design and see whether it works. To that extent, using component and ensuring edges of different component meet exactly is a big step forward. Next step can be seeing those components running around in times and see how each components interact with each other.
But adding another dimension - in here, it is time - is always a great challenge. Sketchup answers it with dynamic component. Here is an example that use dynamic component to run automatic optical inspection system. You can see that a glass coming and sitting on the stage and gripped by tractor and being scanned by cameras that are also moving to cover whole glass area.
To make this kind of simulation, you need to slice the whole time and put which component should move in what direction in each time slice. Refer below screen shot for this.
When user click the bed component, the "ANIMATECUSTOM( "t", 10, 0, 0, 0, 10 )" is executed which increments variable 't' from 0 to 10 in 10 seconds. Refer SketchUp OnClick Functions for detail. Of course, 't' is the time in unit of seconds.
Now we can move parts in various ways in this 10 seconds. In above screen, you can see that the red marks that 't' updates variable 'servox1' to 'servox5' and when time is 2 seconds to 4 seconds, the servox2 is incremented from 0 to 120 cm with 60cm/seconds. Then it is added up to servox and servox is fed into X position of 'tractor' which makes SketchUp draws the tractor component moves along the x-axis at that time slice.
Well, it works but you can see that it is awkward. How ugly it looks to see those variables. It will makes you crazy if you are asked to change any movement in this code. Just think about how much changes should be there if you decided to put 1 second slice after second 2. Maybe there is a better way to organize code. But still you have to write everything in a line. And also look at all those methods - even there is 'AND' method. Of course, there is OR method. Certainly this will make dynamic component in less favorable option.
Reference : Google SektchUp Workshop. Edited by Laurent Brixius, Appendix : Dynamic Components by Matt Chambers
essay on programming languages, computer science, information techonlogies and all.
Subscribe to:
Post Comments (Atom)
2 comments:
Post a Comment