Seeking a ldcad animation script method


RE: Seeking a ldcad animation script method
#15
(2021-10-03, 19:35)Roland Melkert Wrote: With crossed you mean it's at the underside?

If so you could calculate the relative y coordinate and if it's a positive one it's crossed (y being neg up in LDraw).

The term "crossed" comes from the original reference material I used as the basis for the animation script.

My interpretation of this term is that at any stage the driver bar (green beam) is under (i.e. the driver rotation angle is > 180 degrees and < 360 degrees) the invariant bar (white beam), if the driven bar's (red beam) unconstrained rotation point is also under the invariant bar then this is a "crossed" scenario.

Having just written the description in the prior paragraph, I think I have managed to answer my own question! So I'm now going to experiment with the code a bit more to try to remove the need to explicitly specify whether something is crossed or uncrossed.

That being said, I've a suspicion the animation aberration for "crossed" bars may be a consequence of the formula given in the reference material. The formula as originally written didn't seem to cope with obtuse scalene triangles so I ended up using an alternative calculation to derive the required angle.

David
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: Seeking a ldcad animation script method - by David Manley - 2021-10-03, 21:55

Forum Jump:


Users browsing this thread: 2 Guest(s)