Skip to content

WIP: ENH: Multi body PBD and Rigid Body PBD

Andrew Wilson requested to merge andrew.wilson/iMSTK:PbdRigidBodies into master

Lots of things wrong with this atm.

  • Fix PbdState and resetting, currently using PbdDummyState which does nothing.
  • Per body damping rather than system wide damping
  • Tweak PbdBody initialization, remove temporary values I was using.
  • Remove PbdModel::setModelGeometry requirement. Since multiple geometries can be used.
  • Remove testbed examples. Modified some existing examples for testing. Need to revert (large diffs here).
  • Update suturing for virtual particles and apply a semi implicit/together solve instead.
  • Update puncturing/needles for virtual particles.
  • Update CCD for virtual particles. (tricky)
  • Toy with swapping the multi body rigid body constraints with pbd ones (primarily in TissueVolumeNeedleContact)
  • Update data for LigamentCuttingExample


  • Multi body PBD: Allows multiple PbdObjects to be placed/solved in the same system. This also means systems with mixed geometries (ex: LineMesh ligaments attached to a TetrahedralMesh organ).
  • PBD Rigid Bodies: Adds rigid body pbd according to Muellers recent paper. Allowing angular constraints (hinges and joints), rigid on rigid, and rigid on deformable.
  • PbdConstraint Refactor: Reworks collision constraints to share a base, allowing collision constraints internally and internal constraints for collision. Eliminates the need for a separate PbdCollisionSolver. Only one PbdSolver exists.
  • Implicit Collision Solve: Now that all PbdObjects can shared a PbdModel and solve together their collision can solve together. Additionally grasping, stitching, etc all solve together. For example, this allows smooth solution when using collision and grasping. Whereas existing one jitters when both happen simultaneously.
  • PbdCollisionHandling Simplify: Reworks the PbdCollisionHandling to further reduce complexities via function table.
  • PbdObjectController: For pbd virtual coupling.
  • Cutting Refactor: SurfaceMeshCut was generalized into MeshCut and LineMeshCut was setup sharing code between them.
  • LineMeshCut Added: LineMeshCut computes the separations/remeshing of line meshes and returns them for reworking the constraints in the PbdModel. See PbdLigamentCutExample.
  • Also fixes the csharp wrappings for the CellMesh update.
Edited by Andrew Wilson

Merge request reports