I imported two part models into AnyBody and I want to know the spatial coordinates of my model in AnyBody. Also, I want to link the two models with a hinge link, but I don't know how to calculate the coordinates of the two nodes. I have drawings of these two part models. Please give me some hints.
The global coordinate of you segments are the r parameter of that segment.
To link to segments together with a hinge joint you add a AnyRevoluteJoint class between the two nodes. You only need to make a reference to the nodes and the simulation will move them together when the simulation starts - it is of course a good idea to make the load positions relatively close to the final position to help the solver.
I find an example in the Bench Press demo. In the definition of AnySeg Weight, what's the difference between r0 and draw note.sRel = {-0.15, -0.15, 0.6}; How can I know these two coordinate?Thank you!
The r0 parameter is the global initial position of the segment. The AnyRefNode DrwNode does not have a r0 but a sRel which is the node position relative to the parent origin.
You specify the values depending on where you need the elements to be placed. It is done by hand.
The code you post places a weight segment in the global coordinate system and attaches a node used for attaching the weight stl surface. The surface represent a drawing of an actual dumbbell.