Automatic scaling of a dynamic component


#1

I am wondering if it is possible to use the “onclick” behavior in Dynamic components to expand and contract an entity. Here is what I know: you can click on a component and drag it to another length, and things within such as railings, etc., will adjust themselves. What I would like to do, is to scale an object between two lengths, say 8’ - 25’ and back. The idea is viewing a curtain open and close with just a click.The outside edges stay in place, but the inner edges shrink to the smaller width then back with another click. Is this possible? I can get them to raise and lower, but can’t figure out x-only scaling from one edge.


#2

yes
started with a group panel, copy and flip second, contained in a component. added lenX changes as a formula of the overall/2 and some remainder

then for one side formed a curtain and added a formula to reduce its overall depth as its drawn
simple double open.skp (319.8 KB)

can play around with the sizes, but assure the container retains some points to keep the overall size, otherwise you could create a continuous increase/decrease on click


#3

That is exactly what I was hoping for. Thank you very much. Attached is the second most complex component I have had to figure out for myself:
clamshell.skp (88.8 KB)

It is hangar bay doors of the old USS Enterprise from Star Trek. A very rewarding experience.