Deleting joint in existing model and recreating? #930
-
How would one go about deleting or modifying a joint in an existing model? Specifically for the purposes of changing the connections of the joint in order to recreate it? When I attempt to do this I get different error messages. i.e. Thoracoscapular model (Seth) - Delete GH joint and then recreate joints in OSC UI in order to construct a reverse shoulder arthroplasty: I think the topology would be something like this: Scapula(body) -> Scapula_offset -> scapula_to_baseplate (weldjoint)-> baseplate_offset -> baseplate(Body) -> baseplate_offset #Representing the actual lateralization -> baseplate_to_glenosphere (Weldjoint) -> glenosphere_offset-> glenosphere (body)-> glenosphere_offset-> glenohumeral_joint (Ball joint) -> humeral_component_offset -> Humeral_component_contactpoint (body)-> Hum_component_offset (#Variable of interest humerus offset/distalization)->humerus_offset-> humerus (body) The reason for all of the weldjoint redundancies would be to make it easier to measure clinically relevant offset lengths (lateralization and distalization) as they are conventionally measured intra-operatively. I can even create this series of connections in model but without being able to remove the existing "complex" Glenohumeral joint, it doesn't behave properly. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Joint DeletionDeleting a joint is currently not supported in OSC. It's something people want, and we're aware it's an issue. It's held up by the fact that deletion logic has to (e.g.) resolve kinematic chains, sockets, model hierarchies, etc. It would also need to ask the user, probably via a popup, how to handle any ambiguities that were automatically detected by such an algorithm (e.g. by asking the user whether they want to reconnect a child of the joint to something else or delete the entire child chain, and so on). The "easiest" (not easy) way to delete a joint from a model is to manually slice it out of the XML file. It's do-able, but takes a bit of work because you'll inevitably find that child bodies, joints, etc. need to be handled correctly before OSC/OpenSim are willing to open the osim file. There's an The reason you cannot remove the "complex" glenohumeral joint without "something behaving properly" is probably because there are components in the model that depend on the existence of the joint. This isn't limited to child bodies/other joints. E.g. any muscle paths that contain points that are defined in bodies that are children of the glenohumeral joint are indirectly dependent on the existence of the joint. Hopefully, you can see why handling this automatically inside the UI while guaranteeing no crashes, undo/redo support, etc. is a little complicated 😉 . Joint ModificationFor modifying/changing the connections of an existing joint, your best bet in OSC is currently the If the frame being reassigned is a There's also a Weld Joint UsageI'm unsure about your logic w.r.t. weld joints. They don't have any outputs that would give you anything more clinically relevant than (e.g.) measuring the distance between the parent/child frames. I'm unsure, but you can probably simplify what you're doing to:
You'd still end up with two coordinate systems ( |
Beta Was this translation helpful? Give feedback.
-
Hi @adamkewley, I know I am reviving an old discussion here, so hopefully that's alright. I was just trying to use the Thank you again for all the great work! |
Beta Was this translation helpful? Give feedback.
Joint Deletion
Deleting a joint is currently not supported in OSC. It's something people want, and we're aware it's an issue. It's held up by the fact that deletion logic has to (e.g.) resolve kinematic chains, sockets, model hierarchies, etc. It would also need to ask the user, probably via a popup, how to handle any ambiguities that were automatically detected by such an algorithm (e.g. by asking the user whether they want to reconnect a child of the joint to something else or delete the entire child chain, and so on).
The "easiest" (not easy) way to delete a joint from a model is to manually slice it out of the XML file. It's do-able, but takes a bit of work because you'll inevitably f…