- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I previously asked for some help in properly accessing joint occurrences within component occurrences. Several people, including @jeff_strater provided excellent help and helped me to not only access the full set of allJoints and allAsBuiltJoints via the root, but also to distinguish one joint occurrence from another (which all have the same NAME), by accessing the joint's fullPath property, since each one (should!) have a unique fullPath.
That worked just fine for the REVOLUTE joints that I was then working on, and I can indeed now manipulate individual occurrences of my revolute joints. For example, as I scanned through the allJoints and allAsBuiltJoints arrays I found three separate joints each with the exact same name, as I had expected to find, at each one I displayed its fullPath, and each one had a distinct, unique path...
I'm simplifying the names here just for clarity...
The first Rev Joint named "RJ" had path "LTV:1 + HPLG:1"
The second Rev Joint named "RJ" had path "LTV:1 + HPLG:2"
The third Rev Joint named "RJ" had path "LTV:1 + HPLG:3"
In other words they are distinguishable by the HPLG version numbers, HPLG standing for "Hexagon Panel - Landing Gear". So, I succeeded in accessing all three of the "RJ" joints and distinguishing among them so that I could subsequently, individually, manipulate each one separately.
So far so good.
But my project ALSO includes SLIDER joints. Here's a pic of the ONE of the Hexagon Panels and the locations of the Revolute and the Slider joints that I'm trying to access...
You can see that this panel contains both the Revolute joint AND the Slider joint that I want to access.
But I have THREE of these panels, as seem here.
When I go through the root's allJoints and allAsBuilt joints to locate the REVOLUTE joints I get each one, and each one has a UNIQUE fullPath, as I showed above.
BUT when I try to do the same thing, going through the root's allJoints and allAsBuilt joints, to locate the SLIDER joints, here's what I get...
The first Slider Joint named "SJ" has path "LTV:1 + HPLG:3"
The second Slider Joint named "SJ" has path "LTV:1 + HPLG:3"
The third Slider Joint named "SJ" has path "LTV:1 + HPLG:3"
They all have the SAME fullPath. And, weirdly, they all reference HPLG:3!!
When I actually pick up the jointMotion object for each of them (one for each) and use those jointMotion objects to attempt to control the three individual slider joints, each one actually moves the SAME slider joint. And even weirder, they don't move the joint that resides in HPLG:3, they instead move the joint that resides in HPLG:1.
So, something is really weird with occurrences of Slider Joints. It sure seems that it's not actually distinguishing between multiple occurrences of the same slider joint, but rather thinks that they're all the same thing.
Oh, and I guess I should mention that I'm using C++ for my script and therefore accessing the C++ API.
I hope this has been clear as to what's happening and I'm not just suffering from a stroke.
ALSO, on a side note, it APPEARS that, in spite of what the API documentation indicates, the generic Joint object does not actually HAVE an assemblyContext property. If you go through the root->allJoints list and pick up each joint individually and then access its assemblyContext() method, what it returns is a NULL. If you caste the returned joint to, say, a revoluteJoint, then its assemblyContext()method does indeed return a pointer to the assemblyContext and you can then get, from that, things like its fullPath property.
Solved! Go to Solution.