Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.13'

- name: Install dependencies
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions examples/ArticulatedToolManager.scn
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<RequiredPlugin pluginName="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mapping.NonLinear"/> <!-- Needed to use components [RigidMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass, UniformMass] -->
<RequiredPlugin pluginName="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin pluginName="Sofa.Component.IntegrationScheme.Backward"/> <!-- Needed to use components [EulerImplicitIntegrationScheme] -->
<RequiredPlugin pluginName="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TetrahedralCorotationalFEMForceField] -->
<RequiredPlugin pluginName="Sofa.Component.SolidMechanics.Spring"/> <!-- Needed to use components [RestShapeSpringsForceField] -->
<RequiredPlugin pluginName="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
Expand Down Expand Up @@ -57,7 +57,7 @@


<Node name="Instrument" >
<EulerImplicitSolver name="ODE solver" rayleighStiffness="0.05" rayleighMass="1.0" />
<EulerImplicitIntegrationScheme name="ODE solver" rayleighStiffness="0.05" rayleighMass="1.0" />
<SparseLDLSolver template="CompressedRowSparseMatrixMat3x3d"/>

<MechanicalObject name="instrumentState" template="Rigid3" tags="GeomagicDevice" position="0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1"/>
Expand Down
69 changes: 69 additions & 0 deletions examples/Barycentric_Carving.scn
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<?xml version="1.0" ?>
<Node name="root" dt="0.03" showBoundingTree="0" gravity="0 -0.9 0">
<Node name="RequiredPlugins">
<RequiredPlugin pluginName="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase, BruteForceBroadPhase, CollisionPipeline] -->
<RequiredPlugin pluginName="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [MinProximityIntersection] -->
<RequiredPlugin pluginName="Sofa.Component.Collision.Geometry"/> <!-- Needed to use components [PointCollisionModel, SphereCollisionModel, TriangleCollisionModel] -->
<RequiredPlugin pluginName="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [DefaultContactManager] -->
<RequiredPlugin pluginName="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedConstraint] -->
<RequiredPlugin pluginName="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] -->
<RequiredPlugin pluginName="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin pluginName="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass, UniformMass] -->
<RequiredPlugin pluginName="Sofa.Component.IntegrationScheme.Backward"/> <!-- Needed to use components [EulerImplicitIntegrationScheme] -->
<RequiredPlugin pluginName="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TetrahedralCorotationalFEMForceField] -->
<RequiredPlugin pluginName="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin pluginName="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TetrahedronSetGeometryAlgorithms, TetrahedronSetTopologyContainer, TetrahedronSetTopologyModifier, TriangleSetGeometryAlgorithms, TriangleSetTopologyContainer, TriangleSetTopologyModifier] -->
<RequiredPlugin pluginName="Sofa.Component.Topology.Container.Grid"/> <!-- Needed to use components [RegularGridTopology] -->
<RequiredPlugin pluginName="Sofa.Component.Topology.Mapping"/> <!-- Needed to use components [Hexa2TetraTopologicalMapping, Tetra2TriangleTopologicalMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
<RequiredPlugin pluginName="Sofa.GL.Component.Rendering3D"/> <!-- Needed to use components [OglModel] -->
<RequiredPlugin pluginName="SofaCarving"/> <!-- Needed to use components [CarvingManager] -->
<RequiredPlugin pluginName="InfinyToolkit"/> <!-- Needed to use components [CarvingManager] -->
</Node>

<VisualStyle displayFlags="showCollisionModels hideVisual" />

<DefaultAnimationLoop />
<DefaultVisualManagerLoop />
<CollisionPipeline verbose="0" />
<BruteForceBroadPhase/>
<BVHNarrowPhase/>
<CollisionResponse response="PenalityContactForceField" />
<MinProximityIntersection name="Proximity" alarmDistance="1.0" contactDistance="0.1"/>

<EulerImplicitIntegrationScheme name="EulerImplicit" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver name="CG Solver" iterations="25" tolerance="1e-9" threshold="1e-9"/>

<CarvingManager active="true" carvingDistance="1.0"/>

<Node name="carvingElement">
<MechanicalObject name="Particles" template="Vec3d" position="-5 10 0" velocity="0 0 0"/>
<UniformMass name="Mass" totalMass="10.0" />
<SphereCollisionModel name="tool" radius="0.1" contactStiffness="10" tags="CarvingTool"/>
</Node>

<Node name="LiverFFD-lowres">
<EulerImplicitIntegrationScheme />
<CGLinearSolver iterations="100" tolerance="1e-7" threshold="1e-7"/>
<MechanicalObject name="gridDof"/>
<UniformMass totalMass="100.0" />
<RegularGridTopology nx="4" ny="3" nz="3" xmin="-10.25" xmax="-3.25" ymin="0.25" ymax="5.25" zmin="-2" zmax="3" />
<BoxConstraint box="-8.5 0 -2.5 -5 3 2" />
<RegularGridSpringForceField name="Springs" stiffness="400" damping="4" />
<Node name="Visu">
<MeshOBJLoader name="meshLoader" filename="mesh/liver.obj" translation="-5 0 0" handleSeams="1" />
<MechanicalObject position="@[-1].position" name="surfDof" />

<TriangleSetTopologyContainer name="Container" triangles="@meshLoader.triangles"/>
<TriangleSetTopologyModifier name="Modifier" />
<TriangleSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" drawTriangles="0"/>

<TriangleCollisionModel name="triangleCol" contactStiffness="10" tags="CarvingSurface"/>
<PointCollisionModel name="pointCol" contactStiffness="10" tags="CarvingSurface"/>

<BarycentricMapping input="@../gridDof" output="@./surfDof" />
</Node>

</Node>
</Node>
6 changes: 3 additions & 3 deletions examples/BeatingCube.scn
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<RequiredPlugin pluginName="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin pluginName="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass] -->
<RequiredPlugin pluginName="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin pluginName="Sofa.Component.IntegrationScheme.Backward"/> <!-- Needed to use components [EulerImplicitIntegrationScheme] -->
<RequiredPlugin pluginName="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] -->
<RequiredPlugin pluginName="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TetrahedralCorotationalFEMForceField] -->
<RequiredPlugin pluginName="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
Expand All @@ -34,8 +34,8 @@


<Node name="DeformableCube">
<EulerImplicitSolver name="cg_odesolver" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver iterations="15" name="linear solver" tolerance="1.0e-4" threshold="1.0e-4" />
<EulerImplicitIntegrationScheme name="cg_odesolver" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver iterations="15" name="linearSolver" tolerance="1.0e-4" threshold="1.0e-4" />

<MeshGmshLoader name="loader" filename="./mesh/cube_01.msh" />
<MechanicalObject position="@loader.position" name="Volume" />
Expand Down
6 changes: 3 additions & 3 deletions examples/BeatingCube_moving.scn
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<RequiredPlugin pluginName="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin pluginName="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass] -->
<RequiredPlugin pluginName="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin pluginName="Sofa.Component.IntegrationScheme.Backward"/> <!-- Needed to use components [EulerImplicitIntegrationScheme] -->
<RequiredPlugin pluginName="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] -->
<RequiredPlugin pluginName="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TetrahedralCorotationalFEMForceField] -->
<RequiredPlugin pluginName="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
Expand All @@ -34,8 +34,8 @@


<Node name="DeformableCube">
<EulerImplicitSolver name="cg_odesolver" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver iterations="15" name="linear solver" tolerance="1.0e-4" threshold="1.0e-4" />
<EulerImplicitIntegrationScheme name="cg_odesolver" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver iterations="15" name="linearSolver" tolerance="1.0e-4" threshold="1.0e-4" />

<MeshGmshLoader name="loader" filename="./mesh/cube_01.msh" />
<MechanicalObject position="@loader.position" name="Volume" />
Expand Down
14 changes: 7 additions & 7 deletions examples/CollisionDetectionDisplay.scn
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<RequiredPlugin pluginName="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin pluginName="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [BarycentricMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mass"/> <!-- Needed to use components [UniformMass] -->
<RequiredPlugin pluginName="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin pluginName="Sofa.Component.IntegrationScheme.Backward"/> <!-- Needed to use components [EulerImplicitIntegrationScheme] -->
<RequiredPlugin pluginName="Sofa.Component.SolidMechanics.Spring"/> <!-- Needed to use components [RegularGridSpringForceField] -->
<RequiredPlugin pluginName="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin pluginName="Sofa.Component.Topology.Container.Constant"/> <!-- Needed to use components [MeshTopology] -->
Expand All @@ -33,8 +33,8 @@
<MeshOBJLoader name='Loader-floor' filename='mesh/floor2b.obj'/>

<Node name="Torus">
<EulerImplicitSolver name="cg_odesolver" printLog="false" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
<EulerImplicitIntegrationScheme name="cg_odesolver" printLog="false" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver iterations="25" name="linearSolver" tolerance="1.0e-9" threshold="1.0e-9" />
<MechanicalObject dx="0" dy="20" dz="29" rz="64" />
<UniformMass totalMass="10" />
<RegularGridTopology nx="6" ny="5" nz="2" xmin="-7.5" xmax="7.5" ymin="-6" ymax="6" zmin="-1.75" zmax="1.75" />
Expand All @@ -55,8 +55,8 @@
</Node>

<Node name="Dragon">
<EulerImplicitSolver name="cg_odesolver" printLog="false" />
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
<EulerImplicitIntegrationScheme name="cg_odesolver" printLog="false" />
<CGLinearSolver iterations="25" name="linearSolver" tolerance="1.0e-9" threshold="1.0e-9" />
<MechanicalObject dx="20" dy="20" dz="29" rx="33" />
<UniformMass totalMass="10" />
<RegularGridTopology nx="6" ny="5" nz="3" xmin="-11" xmax="11" ymin="-7" ymax="7" zmin="-4" zmax="4" />
Expand All @@ -77,8 +77,8 @@
</Node>

<Node name="Frog">
<EulerImplicitSolver name="cg_odesolver" printLog="false" />
<CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" />
<EulerImplicitIntegrationScheme name="cg_odesolver" printLog="false" />
<CGLinearSolver iterations="25" name="linearSolver" tolerance="1.0e-9" threshold="1.0e-9" />
<MechanicalObject dx="-20" dy="20" dz="29" ry="10" />
<UniformMass totalMass="10" />
<RegularGridTopology nx="6" ny="3" nz="5" xmin="-10" xmax="8" ymin="-3" ymax="2.5" zmin="-7" zmax="7" />
Expand Down
4 changes: 2 additions & 2 deletions examples/Cube_AdvCarvingTexcoords.scn
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<RequiredPlugin pluginName="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mapping.NonLinear"/> <!-- Needed to use components [RigidMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass, UniformMass] -->
<RequiredPlugin pluginName="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin pluginName="Sofa.Component.IntegrationScheme.Backward"/> <!-- Needed to use components [EulerImplicitIntegrationScheme] -->
<RequiredPlugin pluginName="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] -->
<RequiredPlugin pluginName="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TetrahedralCorotationalFEMForceField] -->
<RequiredPlugin pluginName="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
Expand All @@ -34,7 +34,7 @@
<CollisionResponse response="PenalityContactForceField" />
<MinProximityIntersection name="Proximity" alarmDistance="1.0" contactDistance="0.1" />

<EulerImplicitSolver name="EulerImplicit" rayleighStiffness="0.1" rayleighMass="0.1" />
<EulerImplicitIntegrationScheme name="EulerImplicit" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver name="CG Solver" iterations="25" tolerance="1e-9" threshold="1e-9"/>

<AdvancedCarvingManager name="ACarving" active="1" refineDistance="1.0" carvingDistance="0.05"
Expand Down
4 changes: 2 additions & 2 deletions examples/Cube_AdvCarvingWithRefinement.scn
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<RequiredPlugin pluginName="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mapping.NonLinear"/> <!-- Needed to use components [RigidMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass, UniformMass] -->
<RequiredPlugin pluginName="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin pluginName="Sofa.Component.IntegrationScheme.Backward"/> <!-- Needed to use components [EulerImplicitIntegrationScheme] -->
<RequiredPlugin pluginName="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] -->
<RequiredPlugin pluginName="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TetrahedralCorotationalFEMForceField] -->
<RequiredPlugin pluginName="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
Expand All @@ -35,7 +35,7 @@
<CollisionResponse response="PenalityContactForceField" />
<MinProximityIntersection name="Proximity" alarmDistance="1.0" contactDistance="0.1" />

<EulerImplicitSolver name="EulerImplicit" rayleighStiffness="0.1" rayleighMass="0.1" />
<EulerImplicitIntegrationScheme name="EulerImplicit" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver name="CG Solver" iterations="25" tolerance="1e-9" threshold="1e-9"/>

<AdvancedCarvingManager name="ACarving" active="1" refineDistance="1.0" refineCriteria="0.5" carvingDistance="0.5"
Expand Down
4 changes: 2 additions & 2 deletions examples/Cube_AdvCarvingWithRefinementTexcoords.scn
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<RequiredPlugin pluginName="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mapping.NonLinear"/> <!-- Needed to use components [RigidMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass, UniformMass] -->
<RequiredPlugin pluginName="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin pluginName="Sofa.Component.IntegrationScheme.Backward"/> <!-- Needed to use components [EulerImplicitIntegrationScheme] -->
<RequiredPlugin pluginName="Sofa.Component.SceneUtility"/> <!-- Needed to use components [InfoComponent] -->
<RequiredPlugin pluginName="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TetrahedralCorotationalFEMForceField] -->
<RequiredPlugin pluginName="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
Expand All @@ -32,7 +32,7 @@
<CollisionResponse response="PenalityContactForceField" />
<MinProximityIntersection name="Proximity" alarmDistance="1.0" contactDistance="0.1" />

<EulerImplicitSolver name="EulerImplicit" rayleighStiffness="0.1" rayleighMass="0.1" />
<EulerImplicitIntegrationScheme name="EulerImplicit" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver name="CG Solver" iterations="25" tolerance="1e-9" threshold="1e-9"/>

<AdvancedCarvingManager name="ACarving" active="1" refineDistance="1.0" refineCriteria="0.5" carvingDistance="0.5"
Expand Down
4 changes: 2 additions & 2 deletions examples/Cube_Carving.scn
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<RequiredPlugin pluginName="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin pluginName="Sofa.Component.Mapping.Linear"/> <!-- Needed to use components [IdentityMapping] -->
<RequiredPlugin pluginName="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass, UniformMass] -->
<RequiredPlugin pluginName="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin pluginName="Sofa.Component.IntegrationScheme.Backward"/> <!-- Needed to use components [EulerImplicitIntegrationScheme] -->
<RequiredPlugin pluginName="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TetrahedralCorotationalFEMForceField] -->
<RequiredPlugin pluginName="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin pluginName="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TetrahedronSetGeometryAlgorithms, TetrahedronSetTopologyContainer, TetrahedronSetTopologyModifier, TriangleSetGeometryAlgorithms, TriangleSetTopologyContainer, TriangleSetTopologyModifier] -->
Expand All @@ -31,7 +31,7 @@
<CollisionResponse response="PenalityContactForceField" />
<MinProximityIntersection name="Proximity" alarmDistance="1.0" contactDistance="0.1"/>

<EulerImplicitSolver name="EulerImplicit" rayleighStiffness="0.1" rayleighMass="0.1" />
<EulerImplicitIntegrationScheme name="EulerImplicit" rayleighStiffness="0.1" rayleighMass="0.1" />
<CGLinearSolver name="CG Solver" iterations="25" tolerance="1e-9" threshold="1e-9"/>

<CarvingManager active="true" carvingDistance="0.0"/>
Expand Down
Loading
Loading