Dynamic component. Timing of latch to avoid collision

Hey. This probably has been asked and answered already, but I’ll be darned if I can find a solution to my problem. Given the blast gate in the attached, I need to delay the latch dropping until after the gate is in the open position, then the latch must come up before the gate slides closed. Surely there must be a code to allow this, but I sure can’t figure it out.

Any help will be vastly appreciated! The winning answer gets a free steak dinner, but you gotta come to my place to redeem the prize. :smile:

My5BlastGate.skp (2.5 MB)

The trigger is to click somewhere on the gate, not the housing.
Thanks.

use a time line or rate with conditions
My5BlastGate.skp (2.6 MB)

1 Like

Ok, I’ll have mine Medium rare, i could use some food for thoughts…:grin:
you can also ANIMATE to one state, and the combination of clicking on the different parts of the component, get these kind of results:

Bon Apetit!

MediumRare.skp (2.6 MB)

Thanks.
Your solution is closer to what actually must happen with the blast gate in use. However, I was merely interested in a single click solution that would do the same thing. Closer to the solution proposed by @pcmoor above. Thing is, with either solution, I’m still in the dark as to why they work as they do. I took a tutorial by Paul Thompson I found online, which is even closer (albeit its for a gate and draw bar model). But the “why” of how they work escapes me. All the “onclick” encodings are similar yet different enough that I’m still as befuddled as before. Thompson’s solution works on a timeline, which seems to me the happiest approach. But I am in the dark about which parameter means what. Is there someplace I can learn what belongs between commas in lines of code such as the following?

  • ANIMATECUSTOM(“Timeline”,1.1,0,100,0,-456,-5,-456)

It seems that they refer to distances or locations, but some refer to time, and how do the individual components in the model that move relate?

I appreciate greatly the time you guys take to encode a solution for me, but my goal is to understand how to do it myself. Could you point me in that direction? It’s only been 47 years since I’ve been a student … but perhaps I should I go back. (sigh)

The tough part for me is that I don’t need this animation, other than for my personal amusement, but man, it’s fun,

Thanks again, guys. All is appreciated.
Thom

P.S. @MikeWayzovski, how do you get the prompt things that give on-screen instruction to what’s going on?

Would this address the challenge? (Enclosed)

Compound Animate.skp (28.8 KB)

Forgot to ask; what’s Home for you? Gonna claim the Prize.

Nino

@ninoalva, your example is close to my problem because there is a sliding component and a rotating one. It seems to work (i.e., avoiding collisions) because there are clearances between the rotating bar and the sliding box.
But in my problem, the rotating component must touch the sliding one, and move out of the way BEFORE the sliding component moves. Check out my modification here: Compound AnimateTP.skp (29.3 KB)

The rotating bar must also wait to fall AFTER the sliding box is back in its initial position. Review @MikeWayzovski’s solution above.

Edit: Just saw your edit, Nino. I’m in Bend, Oregon. But to claim your prize, you have to show me how to do exactly what I need done. So far the closest to doing that is @MikeWayzovski, who, because he lives in Netherlands, got his prize by email earlier today. :stuck_out_tongue:

1 Like

Shucks. Thought rules said the winner had to Go To Your Place.

RE: Message -See “Alert” Under OnClick Functions.

Regards
Nino

There is still some left:

To get the tooltip messages, the Onclick functions have these hidden behind the blue detail icon on the right in the formula area.

The tooltips are not to be confused with the Alert message function

For the ANIMATECUSTOM, the time is in seconds and the easein and easeout are values (0-100) that represent the delay at start or the braking at the end of the animation. I am not sure how these are calculated, there is also a part of the animation were inbetween the eases, the speed is constant.
Check also this example;

PCMoore offered a similar solution on another DC Post recently. I cannot seem to find how to slow-down the shelf ease In/Out animation speed.
MediumRare xSAF TwoClicks.skp (2.6 MB)

PERHAPS: We need to Concatenate another OnClick for the Sliding-shelf.

Regards
Nino

Thanks for trying Nino, but I’m working with SU version 2018 and can’t open the file.
:roll_eyes:

R:18 version enclosed.

NinoMediumRare xSAF TwoClicks R18.skp (2.6 MB)

Thanks, Nino.
That is closest solution yet (although I don’t understand WHY it works).

But now I have a question about idiosyncrasies of DCs in general. So I’m messing around trying to get things to work, find that I’ve made some less-than-optimum choices, revise components (including renaming them), and when I open Component Attributes, the OLD NAMES of things are still there. Why? And how can I “clean all that up?” I’ve exploded assemblies and rebuilt them, and yet the OLD NAMES persist. Isn’t there some way to purge old stuff out and start anew?

Check Instances that appear in the Components Tray and Purge. The fact that Compos are NOT in the model does not mean they no longer exist.

Nino

Yeah, I understand that. Purging unused components doesn’t change the ones that remain in the model. And it’s THOSE that are the problem.

For example: I have a simple component that originally was named “Brkt Crank” and I didn’t care for that as it didn’t follow a more recent naming convention. So I renamed it “Crank Bracket” (all things “crank” have the initial name “Crank” ). But Component Attributes still insists it is Brkt Crank. Sure, I can go to each instance in Component Attributes and rename things there, but that’s super tedious. I have some 115 instances of #8 x 1 1/4" flat head wood screws, named #8FHWSx1/25. If I decided to change naming convention to “Screw: #8_Flat_Head_125”_Long" … Well, I won’t do that, but there’s the problem, eh? Component Attributes would still see them as #8FHWSx1/25.

This is were @Aerilius Attribute inspector comes in handy:

https://extensions.sketchup.com/en/content/attribute-inspector

Ms. Eneroth has a handy extension that allows opening a newer version file. I use 2018 Pro also, but all models now available on 3D Warehouse are 2019, 2020, 2021, etc. So I’ve used this extension a LOT lately.

https://extensions.sketchup.com/search/?q=newer%20version

and if that link doesn’t work, just go to Extension Warehouse and search “newer version”

In the Component Attributes dialog, up at the top right, just next to the button that toggles formulas on/off, there’s a refresh button. Try that and see if it doesn’t refresh/update names to reflect new names in the model.