DC - How to make an object rotate, while making sure it doesn't rotate

cheers, sorry I took it the wrong way

there is no ANG function, its just a custom attribute, you can change its name to angle. But then you have to change “ang” to “angle” in the animation as this does not automatically update . Try changing the range or radius.

I didn’t know I could click your icon and see your profile, or that I needed to. After tonight’s conversation, now I do. Honestly, outside of big name celebrities who use screen names, I’ve never known of someone who had two completely different names. But that’s not my business, and I agree with your sentiment that this is “Too much hassle”. This isn’t why I’m here looking for help with coding DC’s.

Ok I see now that it’s a custom attribute. And that you have the X and Z attributes referring to it. And that you’re using actual trig calls in your statements. And from what I’ve seen of the sketchup documentation I’ll have to look elsewhere to revitalize my trig. It’s only been dormant in my head since 1982, but if I feel the urge strongly enough, I’ll figure it out. Will study what you posted above, your model you sent, and I’m sure the internet is big enough to get me going again with trig functions, even though I haven’t used it for 40 years. Thanks for your generous help. All 3 of you.

1 Like

Snowplow.skp (2.5 MB)

1 Like

Nice job!


(I took the liberty to rotate the grab rings, I guess they would move too, don’t you think:)

Ha, they just might. Several days back I had rotated some of those pins at random angles in an attempt to simulate realism. This later played havoc as I shared them across other contexts / parts groupings. With axes going this way and that, you know. So I nixxed that idea and redrew the component from raw geometry and just used an identical pin throughout. But in a finished model, sure. Nice touch.

Am currently working on properly animating the landing gear on a 48 foot spread axle step deck. Based on how much simpler of a model it is, it’s kicking my tail. But because I’m not in a rush now, it’s teaching me things. Like structure. In general it’s an opportunity in a much less complex model to better understand relationships between contexts, specifically as they function or are displayed in the DC attributes window.

I’ll give one example, not so much for you but for any rookies that may stumble upon this thread. I’d never really stopped to think about how when in Outliner, when you SELECT a group/component, it’s not the same as having it open. I mean I’ve always known this instinctively and have never had a problem working in a model for a lack of understanding this. I’m just saying, working in the DC environment with an additional window open (DC attributes), it made me ponder the system and how it’s working.

I compared it to say, a jar of pickles. You can take it in your hand. It’s now SELECTED. But to actually have a pickle, you have to go one step further, which is OPENing the jar. Now you can edit it’s contents (eat a pickle). And backing up, the refrigerator is like a parent component to the jar. The house is like a parent component to the refrigerator. I have to stop. When I start comparing reality to a software application, it’s too much, lol.

Ok another example. (of things I pondered while working on landing gear) (Sorry)
You have your model open.
You have your outliner open.
You have your DC attributes window open.

Before, I wanted to navigate the parts of my model via the DC Attr window. Which is frustrating because you can’t. Now, because I’ve taken the time to understand, it’s apparent that Outliner plays a critical role. We still need to use either the model or the outliner to SELECT parts. It can be done in the model, but using the Outliner is MUCH better because there’s no guessing as to what you have selected. THEN, you look at DC Attributes and code. I know these might sound simple. But in kindergarten, didn’t we consider words a complex topic when we had yet to even learn the alphabet? I didn’t understand something as simple as this about the DC Attributes window. Now that I do, it’s easier to use as a tool.

Third. (No apologies)
DC Attributes window ONLY displays, at any given time, “a PARENT, and it’s CHILDREN”. It never tries to display the entire structure. Understanding this simple fact greatly helps. Because I was so used to using Outliner and having access to the entire structure. It’s getting easier to use the DC Attr interface because I’m learning how it works.

Sorry for going past polite limits with the long message. Will catch you later.

1 Like