How to Mark and Track a Specific Node in a Deformable Model During Simulation in SOFAv23.06? #5047
Replies: 1 comment 1 reply
-
Hi, I suggest to use a SubsetMapping in conjonction with another MechanicalObject to filter your tracked points. If you track a single point, you would end up with a MechanicalObject containing only one position, force etc. In XML, it would look like: <MechanicalObject template="Vec3d" name="mainDOFs"/>
<Node name="filtered">
<MechanicalObject template="Vec3d" name="filteredDOFs"/>
<SubsetMapping input="@../mainDOFs" output="@filteredDOFs" indices="137"/>
</Node> For better visual tracking, you can use TrailRenderer (see an example here). Otherwise, you can setup the visualization of your point directly in the filtered MechanicalObject (see the Data If you want to export some of the data, you can access it through a Data (for example |
Beta Was this translation helpful? Give feedback.
-
Hello SOFA Community,
I'm currently working with SOFA version v23.06, and I have successfully imported a deformable tetrahedral mesh model and added fixed constraints.
I would like to achieve the following:
Mark a Specific Node: I need to visually highlight a specific node within the deformable model (for example, node index 137). The goal is to easily track this node's position and state during the simulation. How can I set a different color or marker for this node compared to the rest of the model?
Extract Node Data Over Time: During a deformation process, I would like to extract the position and force data for this specific node over a certain time period. What would be the best way to export this information (preferably as a text or CSV file)?
Thank you in advance for your assistance! Any advice or code examples would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions