TutorialTopologyLinearMesh
From SOFAWiki
Tutorial : Linear Mesh Topology
- Previous Tutorial: TutorialBasicCube
- Next Tutorial: TutorialTopologySurfaceMesh
Contents |
Example Scene showing the importance of mesh
This example is distributed inexamples/Tutorials/Basic/TutorialTopologyLinearMesh.scnwithin SofaSVN and SOFA distributions starting from 1.0 beta 4.
Graph
XML Description
<?xml version="1.0" ?> <!-- See https://wiki.sofa-framework.org/wiki/TutorialTopologyLinearMesh --> <Node name="Root" gravity="0 -9.81 0" dt="0.02" showVisualModels="1" showBehaviorModels="1" showForceFields="1" showInteractionForceFields="1"> <!-- Basic Components to perform the collision detection --> <DefaultPipeline name="DefaultCollisionPipeline" depth="6"/> <BruteForceDetection name="Detection"/> <MinProximityIntersection name="Proximity" alarmDistance="0.3" contactDistance="0.2"/> <DefaultContactManager name="Response"/> <DefaultCollisionGroupManager name="Group"/> <Node name="Pendulum Static Mesh"> <MechanicalObject template="Vec3d" name="DOF" position="0 0 4 1 0 4 2 0 4 3 0 4 4 0 4 5 0 4"/> <UniformMass template="Vec3d" name="Mass" totalmass="1"/> <CGLinearSolver template="GraphScattered" name="CG solver"/> <EulerImplicitSolver name="EulerImplicit"/> <FixedConstraint template="Vec3d" name="Fixed dof" indices="0"/> <MeshTopology name="Static Mesh" edges="0 1 1 2 2 3 3 4 4 5 "/> <MeshSpringForceField template="Vec3d" name="springs"/> </Node> <Node name="Pendulum No Mesh"> <MechanicalObject template="Vec3d" name="DOF" position="0 0 -4 1 0 -4 2 0 -4 3 0 -4 4 0 -4 5 0 -4"/> <UniformMass template="Vec3d" name="Mass" totalmass="1"/> <CGLinearSolver template="GraphScattered" name="CG solver"/> <EulerImplicitSolver name="EulerImplicit"/> <FixedConstraint template="Vec3d" name="Fixed dof" indices="0"/> <MeshTopology name="Static Mesh"/> <MeshSpringForceField template="Vec3d" name="springs"/> </Node> </Node>
Example Scene Using different linear meshes (static, dynamic and regular)
This example is distributed inexamples/Tutorials/Basic/TutorialTopologyLinearDifferentMesh.scnwithin SofaSVN and SOFA distributions starting from 1.0 beta 4.
Graph
XML Description
<?xml version="1.0" ?> <!-- See https://wiki.sofa-framework.org/wiki/TutorialTopologyLinearMesh --> <Node name="Root" gravity="0 -9.81 0" dt="0.02" showVisualModels="1" showBehaviorModels="1" showForceFields="1" showInteractionForceFields="1"> <!-- Basic Components to perform the collision detection --> <DefaultPipeline name="DefaultCollisionPipeline" depth="6"/> <BruteForceDetection name="Detection"/> <MinProximityIntersection name="Proximity" alarmDistance="0.3" contactDistance="0.2"/> <DefaultContactManager name="Response"/> <DefaultCollisionGroupManager name="Group"/> <Node name="Pendulum Static Mesh"> <MechanicalObject template="Vec3d" name="DOF" position="0 0 -2 1 0 -2 2 0 -2 3 0 -2 4 0 -2 5 0 -2"/> <UniformMass template="Vec3d" name="Mass" totalmass="1"/> <CGLinearSolver template="GraphScattered" name="CG solver"/> <EulerImplicitSolver name="EulerImplicit"/> <FixedConstraint template="Vec3d" name="Fixed dof" indices="0"/> <MeshTopology name="Static Mesh" edges="0 1 1 2 2 3 3 4 4 5 "/> <MeshSpringForceField template="Vec3d" name="springs"/> </Node> <Node name="Pendulum Regular Mesh"> <MechanicalObject template="Vec3d" name="DOF" position="0 0 6"/> <UniformMass template="Vec3d" name="Mass" totalmass="1"/> <CGLinearSolver template="GraphScattered" name="CG solver"/> <EulerImplicitSolver name="EulerImplicit"/> <FixedConstraint template="Vec3d" name="Fixed dof" indices="0"/> <RegularGridTopology name="Regular Mesh" n="6 1 1" min="0 0 6" max="5 1 6"/> <RegularGridSpringForceField template="Vec3d" name="springs"/> </Node> <Node name="Pendulum Dynamic Mesh"> <MechanicalObject template="Vec3d" name="DOF" position="0 0 2 1 0 2 2 0 2 3 0 2 4 0 2 5 0 2"/> <UniformMass template="Vec3d" name="Mass" totalmass="1"/> <CGLinearSolver template="GraphScattered" name="CG solver"/> <EulerImplicitSolver name="EulerImplicit"/> <FixedConstraint template="Vec3d" name="Fixed dof" indices="0"/> <EdgeSetTopologyContainer name="Dynamic Mesh" edges="0 1 1 2 2 3 3 4 4 5 "/> <MeshSpringForceField template="Vec3d" name="springs"/> </Node> </Node>
