Dynamic Node Constraint for Deformable Object? #5607
Replies: 3 comments
-
|
Hello ! You don't need to add new child if you only want to add a new ForceField to the node. You could directly add it to the original node. But it would require you to call init on this new object after its creation if it is during the simulation. But I don't think thuis is what you want. The RestShapeSpringForceField has got a 'points' data that specify on which point to apply a spring. Why not just modify this list dynamically ? Tell me if this solves your issue. |
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
-
|
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi SOFA community,
I have a deformable object with mixed rigid-deformable structure. The rigid region control works fine, but I need to dynamically constrain individual nodes for shape correction.
Goal: Add/remove constraints on specific nodes at runtime to correct deformation.
Current approach: Using
RestShapeSpringsForceFieldwith dynamic child node creation:Error:
node618Spring is not associated to any mechanical statePrevious attempts:
FixedConstraint- template matching issues and mechanical state errorsQuestion: What's the correct way to dynamically constrain individual nodes in a deformable object? Should I use a different constraint type or modify the mechanical model structure?
Any guidance would be appreciated!
Thanks
My code is here
Beta Was this translation helpful? Give feedback.
All reactions