Skip to content
Merged
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
20 changes: 11 additions & 9 deletions examples/Cube_AdvCarvingTexcoords.scn
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,27 @@
<Node name="carvingElement">
<MechanicalObject name="Particles" template="Rigid3d" position="5 12 5 0 0 0 1" />
<UniformMass name="Mass" totalMass="10.0" template="Rigid3d"/>
<SphereCollisionModel name="tool" radius="0.1" tags="CarvingTool"/>
<SphereCollisionModel name="tool" radius="0.1" tags="CarvingTool" contactStiffness="10"/>
<Node name="VisuTool" >
<MeshOBJLoader name="meshLoader_1" filename="./mesh/sphere.obj" scale3d="0.1 0.1 0.1"/>
<OglModel name="InstrumentVisualModel" src="@meshLoader_1" color="0.0 1.0 0.0 1.0" />
<RigidMapping name="MM->VM mapping" input="@.." output="@InstrumentVisualModel" />
</Node>
</Node>

<Node name="Hexa2Tetra" >
<Node name="Hexa2Tetra">
<RegularGridTopology name="HexaTop" n="11 11 11" min="0 0 0" max="10 10 10" />
<TetrahedronSetTopologyContainer name="Container" position="@HexaTop.position" />
<TetrahedronSetTopologyModifier name="Modifier"/>
<Hexa2TetraTopologicalMapping input="@HexaTop" output="@Container" swapping="false" />
<Node name="TetraMesh">
<TetrahedronSetTopologyContainer name="Container" position="@HexaTop.position" />
<TetrahedronSetTopologyModifier name="Modifier"/>
<Hexa2TetraTopologicalMapping input="@../HexaTop" output="@Container" swapping="false" />
</Node>
</Node>

<Node name="Cube">
<MechanicalObject position="@../Hexa2Tetra/Container.position" name="Volume" />
<MechanicalObject position="@../Hexa2Tetra/TetraMesh/Container.position" name="Volume" />

<TetrahedronSetTopologyContainer name="Tetra_topo" src="@../Hexa2Tetra/Container" />
<TetrahedronSetTopologyContainer name="Tetra_topo" src="@../Hexa2Tetra/TetraMesh/Container" />
<TetrahedronSetTopologyModifier name="Modifier" />
<TetrahedronSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" drawTetrahedra="0" drawScaleTetrahedra="0.8"/>

Expand All @@ -78,8 +80,8 @@
<TriangleSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" drawTriangles="0"/>
<Tetra2TriangleTopologicalMapping input="@../Tetra_topo" output="@Container" />

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

<Node name="liver-Visual">
<OglModel name="Visual" texcoords="@../../../ACarving.texcoords" texturename="textures/colorMap.png" />
Expand Down
20 changes: 11 additions & 9 deletions examples/Cube_Carving.scn
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,22 @@
<Node name="carvingElement">
<MechanicalObject name="Particles" template="Vec3d" position="5 15 5" velocity="0 0 0"/>
<UniformMass name="Mass" totalMass="10.0" />
<SphereCollisionModel name="tool" radius="0.1" tags="CarvingTool"/>
<SphereCollisionModel name="tool" radius="0.1" contactStiffness="10" tags="CarvingTool"/>
</Node>

<Node name="Hexa2Tetra" >
<Node name="Hexa2Tetra">
<RegularGridTopology name="HexaTop" n="11 11 11" min="0 0 0" max="10 10 10" />
<TetrahedronSetTopologyContainer name="Container" position="@HexaTop.position" />
<TetrahedronSetTopologyModifier name="Modifier"/>
<Hexa2TetraTopologicalMapping input="@HexaTop" output="@Container" swapping="false" />
<Node name="TetraMesh">
<TetrahedronSetTopologyContainer name="Container" position="@HexaTop.position" />
<TetrahedronSetTopologyModifier name="Modifier"/>
<Hexa2TetraTopologicalMapping input="@../HexaTop" output="@Container" swapping="false" />
</Node>
</Node>

<Node name="Cube">
<MechanicalObject position="@../Hexa2Tetra/Container.position" name="Volume" />
<MechanicalObject position="@../Hexa2Tetra/TetraMesh/Container.position" name="Volume" />

<TetrahedronSetTopologyContainer name="Tetra_topo" src="@../Hexa2Tetra/Container" />
<TetrahedronSetTopologyContainer name="Tetra_topo" src="@../Hexa2Tetra/TetraMesh/Container" />
<TetrahedronSetTopologyModifier name="Modifier" />
<TetrahedronSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" drawTetrahedra="0" drawScaleTetrahedra="0.8"/>

Expand All @@ -69,8 +71,8 @@
<TriangleSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" drawTriangles="0"/>
<Tetra2TriangleTopologicalMapping input="@../Tetra_topo" output="@Container" />

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

<Node name="liver-Visual">
<OglModel name="Visual" color="green" />
Expand Down
20 changes: 11 additions & 9 deletions examples/Cube_CarvingWithPenetration.scn
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,27 @@
<Node name="carvingElement">
<MechanicalObject name="Particles" template="Rigid3d" position="5 15 5 0 0 0 1" />
<UniformMass name="Mass" totalMass="10.0" template="Rigid3d"/>
<SphereCollisionModel name="tool" radius="0.1" tags="CarvingTool"/>
<SphereCollisionModel name="tool" radius="0.1" contactStiffness="10" tags="CarvingTool"/>
<Node name="VisuTool" >
<MeshOBJLoader name="meshLoader_1" filename="./mesh/sphere.obj" scale3d="0.1 0.1 0.1"/>
<OglModel name="InstrumentVisualModel" src="@meshLoader_1" color="0.0 1.0 0.0 1.0" />
<RigidMapping name="MM->VM mapping" input="@.." output="@InstrumentVisualModel" />
</Node>
</Node>

<Node name="Hexa2Tetra" >
<Node name="Hexa2Tetra">
<RegularGridTopology name="HexaTop" n="11 11 11" min="0 0 0" max="10 10 10" />
<TetrahedronSetTopologyContainer name="Container" position="@HexaTop.position" />
<TetrahedronSetTopologyModifier name="Modifier"/>
<Hexa2TetraTopologicalMapping input="@HexaTop" output="@Container" swapping="false" />
<Node name="TetraMesh">
<TetrahedronSetTopologyContainer name="Container" position="@HexaTop.position" />
<TetrahedronSetTopologyModifier name="Modifier"/>
<Hexa2TetraTopologicalMapping input="@../HexaTop" output="@Container" swapping="false" />
</Node>
</Node>

<Node name="Cube">
<MechanicalObject position="@../Hexa2Tetra/Container.position" name="Volume" />
<MechanicalObject position="@../Hexa2Tetra/TetraMesh/Container.position" name="Volume" />

<TetrahedronSetTopologyContainer name="Tetra_topo" src="@../Hexa2Tetra/Container" />
<TetrahedronSetTopologyContainer name="Tetra_topo" src="@../Hexa2Tetra/TetraMesh/Container" />
<TetrahedronSetTopologyModifier name="Modifier" />
<TetrahedronSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" drawTetrahedra="0" drawScaleTetrahedra="0.8"/>

Expand All @@ -76,8 +78,8 @@
<TriangleSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" drawTriangles="0"/>
<Tetra2TriangleTopologicalMapping input="@../Tetra_topo" output="@Container" />

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

<Node name="liver-Visual">
<OglModel name="Visual" color="red" />
Expand Down
22 changes: 12 additions & 10 deletions examples/TetrahedronBeamMultiMaterials.scn
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
<?xml version="1.0" ?>
<Node name="root" dt="0.005" showBoundingTree="0" gravity="0 -9 0">

<Node name="plugins">
<RequiredPlugin name="Sofa.Component.AnimationLoop"/> <!-- Needed to use components [FreeMotionAnimationLoop] -->
<RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Correction"/> <!-- Needed to use components [LinearSolverConstraintCorrection] -->
<RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Solver"/> <!-- Needed to use components [GenericConstraintSolver] -->
<RequiredPlugin name="Sofa.Component.Collision.Detection.Algorithm"/> <!-- Needed to use components [BVHNarrowPhase,BruteForceBroadPhase,CollisionPipeline] -->
<RequiredPlugin name="Sofa.Component.Collision.Detection.Intersection"/> <!-- Needed to use components [LocalMinDistance] -->
<RequiredPlugin name="Sofa.Component.Collision.Geometry"/> <!-- Needed to use components [TriangleCollisionModel] -->
<RequiredPlugin name="Sofa.Component.Collision.Response.Contact"/> <!-- Needed to use components [CollisionResponse] -->
<RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Correction"/> <!-- Needed to use components [UncoupledConstraintCorrection] -->
<RequiredPlugin name="Sofa.Component.Constraint.Lagrangian.Solver"/> <!-- Needed to use components [LCPConstraintSolver] -->
<RequiredPlugin name="Sofa.Component.Constraint.Projective"/> <!-- Needed to use components [FixedProjectiveConstraint] -->
<RequiredPlugin name="Sofa.Component.Engine.Select"/> <!-- Needed to use components [BoxROI] -->
<RequiredPlugin name="Sofa.Component.LinearSolver.Direct"/> <!-- Needed to use components [SparseLDLSolver] -->
<RequiredPlugin name="Sofa.Component.LinearSystem"/> <!-- Needed to use components [ConstantSparsityPatternSystem] -->
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [MeshMatrixMass] -->
<RequiredPlugin name="Sofa.Component.LinearSolver.Iterative"/> <!-- Needed to use components [CGLinearSolver] -->
<RequiredPlugin name="Sofa.Component.Mass"/> <!-- Needed to use components [DiagonalMass] -->
<RequiredPlugin name="Sofa.Component.ODESolver.Backward"/> <!-- Needed to use components [EulerImplicitSolver] -->
<RequiredPlugin name="Sofa.Component.SolidMechanics.FEM.HyperElastic"/> <!-- Needed to use components [TetrahedronHyperelasticityFEMForceField] -->
<RequiredPlugin name="Sofa.Component.SolidMechanics.FEM.Elastic"/> <!-- Needed to use components [TetrahedralCorotationalFEMForceField] -->
<RequiredPlugin name="Sofa.Component.StateContainer"/> <!-- Needed to use components [MechanicalObject] -->
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TetrahedronSetGeometryAlgorithms,TetrahedronSetTopologyContainer,TetrahedronSetTopologyModifier] -->
<RequiredPlugin name="Sofa.Component.Topology.Container.Dynamic"/> <!-- Needed to use components [TetrahedronSetGeometryAlgorithms,TetrahedronSetTopologyConta
iner,TetrahedronSetTopologyModifier,TriangleSetGeometryAlgorithms,TriangleSetTopologyContainer,TriangleSetTopologyModifier] -->
<RequiredPlugin name="Sofa.Component.Topology.Container.Grid"/> <!-- Needed to use components [RegularGridTopology] -->
<RequiredPlugin name="Sofa.Component.Topology.Mapping"/> <!-- Needed to use components [Hexa2TetraTopologicalMapping] -->
<RequiredPlugin name="Sofa.Component.Topology.Mapping"/> <!-- Needed to use components [Hexa2TetraTopologicalMapping,Tetra2TriangleTopologicalMapping] -->
<RequiredPlugin name="Sofa.Component.Visual"/> <!-- Needed to use components [VisualStyle] -->
<RequiredPlugin name="Sofa.GUI.Component"/> <!-- Needed to use components [ConstraintAttachButtonSetting] -->
</Node>

<VisualStyle displayFlags="showForceFields showBehaviorModels" />
Expand Down
Binary file not shown.
Binary file not shown.
Loading