How to make a Wm2d Latch

A Bessler, gravity, free-energy free-for-all. Registered users can upload files, conduct polls, and more...

Moderator: scott

Post Reply
User avatar
jim_mich
Addict
Addict
Posts: 7467
Joined: Sun Dec 07, 2003 12:02 am
Location: Michigan
Contact:

How to make a Wm2d Latch

Post by jim_mich »

Sometimes it is desirable to make a Wm2d latch to hold and release the movement of an object at certain times and under certain circumstances.

It takes four settings in the properties window to make a Wm2d formula type latch...

First make an actuator such that when it is rigid it latches (prevents) any movement between two objects.

Select the actuator and open the properties window. Set the actuator's type to 'Length'.

Set the actuator's 'Value' as a formula for the actuators current length. To do this, find the index numbers of the two end points of the actuator. Click the down arrow to open the list of all objects, which will indicate which points go with the actuator. Make a formula similar to this: "|Point[64].p-Point[65].p|" This formula begins and ends with a "|" symbol. This tells Wm2d to use the distance between the global positions of the two points.

Uncheck the 'Active when Always' box.

Now comes the hard part. Whenever the actuator is 'Active' its length will be rigid at the current length, which will hold (latch) any movement. You must devise a formula to put into the bottom 'Active when' box for when you want the actuator to be latched rigid.

The formula will be true or false. It will consist of "Or" and/or "And" formulas. If you want latching when a weight is to the right and above the wheel axle then the formula might be "And( Body[56].p.x>0, Body[56].p.y>0 )" You can build very complex formulas such as the one below that I once used.

Code: Select all

Or&#40;And&#40;Body&#91;57&#93;.v.r>Body&#91;1&#93;.v.r,And&#40;Point&#91;61&#93;.p.x>-1.5688,Point&#91;61&#93;.p.y<17.3027&#41;&#41;,
And&#40;Body&#91;57&#93;.v.r<Body&#91;1&#93;.v.r,Or&#40;Point&#91;61&#93;.p.x<-1.5688,Point&#91;61&#93;.p.y>17.3027&#41;&#41;&#41;
Note that the actuator can only hold length ways, not side ways, so plan accordingly.

Image
Paul
Enthusiast
Enthusiast
Posts: 192
Joined: Fri Aug 19, 2005 7:24 pm
Location: Pavia - Italy

re: How to make a Wm2d Latch

Post by Paul »

Thanks JIM for this method, it is very useful for everybody

Paul
User avatar
Fletcher
Addict
Addict
Posts: 8443
Joined: Wed Nov 05, 2003 9:03 am
Location: NZ

re: How to make a Wm2d Latch

Post by Fletcher »

Another good method Paul (not as sophisticated as Jims') is to connect things by a 'massless' rod, then alter the properties box of the rod to make the rod break its attachment when you want it to, with a time formula. A crude latch.
Paul
Enthusiast
Enthusiast
Posts: 192
Joined: Fri Aug 19, 2005 7:24 pm
Location: Pavia - Italy

re: How to make a Wm2d Latch

Post by Paul »

Thanks also to you Fletcher
amateur
Enthusiast
Enthusiast
Posts: 218
Joined: Fri Jul 02, 2004 2:56 am

re: How to make a Wm2d Latch

Post by amateur »

A concrete example, using a rigid joint on top of a pivot joint, "catching" and "releasing" to provide "push" in one direction.

The model built is related to the "four clocks in a wheel" paradigm mentioned in another thread. (I haven't ever made it work indefinitely.)
Attachments
virtlatch_ex1.wbs.txt
script to build model with (sometimes active) rigid pivot over (always active) rotational pivot
(31.54 KiB) Downloaded 309 times
Post Reply