Skip to content

Commit

Permalink
update scenes
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy committed Dec 17, 2021
1 parent e476d28 commit ede540c
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 31 deletions.
48 changes: 31 additions & 17 deletions examples/ConstraintRotationFinder.scn
Original file line number Diff line number Diff line change
@@ -1,48 +1,62 @@
<Node name="root" gravity="0.0 -2.0 0.0" dt="0.04">
<RequiredPlugin name="SofaBoundaryCondition"/>
<RequiredPlugin name="SofaConstraint"/>
<RequiredPlugin name="SofaDeformable"/>
<RequiredPlugin name="SofaEngine"/>
<RequiredPlugin name="SofaGeneralDeformable"/>
<RequiredPlugin name="SofaImplicitOdeSolver"/>
<RequiredPlugin name="SofaLoader"/>
<RequiredPlugin name="SofaMeshCollision"/>
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name="ShapeMatchingPlugin"/>

<FreeMotionAnimationLoop initial_guess="true" displayTime="1" />
<CollisionPipeline verbose="0" />
<BruteForceDetection name="N2" />
<DefaultPipeline verbose="0" draw="0" />
<BruteForceBroadPhase />
<BVHNarrowPhase />
<LocalMinDistance name="Proximity" alarmDistance="0.50" contactDistance="0.25" />
<CollisionResponse name="Response" response="FrictionContact" />
<DefaultContactManager name="Response" response="FrictionContact" />
<LCPConstraintSolver maxIt="1000" tolerance="0.001" />
<DefaultAnimationLoop />
<DefaultVisualManagerLoop />
<Node name="Floor">
<RegularGrid nx="2" ny="1" nz="2" xmin="20" xmax="-20" ymin="-3.05" ymax="-3.05" zmin="-20" zmax="20" />
<RegularGridTopology nx="2" ny="1" nz="2" xmin="20" xmax="-20" ymin="-3.05" ymax="-3.05" zmin="-20" zmax="20" />
<MechanicalObject />
<Triangle simulated="0" moving="0" group="1" />
<Line simulated="0" moving="0" group="1" />
<Point simulated="0" moving="0" group="1" />
<TriangleCollisionModel simulated="0" moving="0" group="1" />
<LineCollisionModel simulated="0" moving="0" group="1" />
<PointCollisionModel simulated="0" moving="0" group="1" />
<Node name="Visu">
<OglModel name="Visual" color="red" />
<IdentityMapping input="@.." output="@Visual" />
</Node>
</Node>
<Node name="Sphere">
<MeshObjLoader filename="mesh/sphere.obj" name="loader" />
<Mesh src="@loader" />
<MeshOBJLoader filename="mesh/sphere.obj" name="loader" />
<MeshTopology src="@loader" />
<MechanicalObject src="@loader" scale="3.95" dx="0" dy="1" dz="3" />
<Triangle simulated="0" moving="0" group="1" />
<Line simulated="0" moving="0" group="1" />
<Point simulated="0" moving="0" group="1" />
<TriangleCollisionModel simulated="0" moving="0" group="1" />
<LineCollisionModel simulated="0" moving="0" group="1" />
<PointCollisionModel simulated="0" moving="0" group="1" />
<Node name="Visu">
<OglModel name="Visual" color="blue" />
<IdentityMapping input="@.." output="@Visual" />
</Node>
</Node>
<Node name="SquareCloth1">
<EulerImplicit rayleighMass="0.05" />
<EulerImplicitSolver rayleighMass="0.05" />
<CGLinearSolver iterations="10" threshold="0.000001" tolerance="1e-5"/>
<RegularGrid nx="15" ny="1" nz="15" xmin="12" xmax="-12" ymin="7" ymax="7" zmin="-12" zmax="12" />
<RegularGridTopology nx="15" ny="1" nz="15" xmin="12" xmax="-12" ymin="7" ymax="7" zmin="-12" zmax="12" />
<MechanicalObject />
<UniformMass totalmass="100" />
<UniformMass totalMass="100" />
<BoxConstraint box="-12.1 7 11.9 -9.9 7 12.1 9.9 7 11.9 12.1 7 12.1" />
<MeshSpringForceField name="Springs" stiffness="1000" damping="0" />
<QuadBendingSprings name="Bend" stiffness="2000" damping="1" />
<RotationFinder showRotations="true" axisToFlip="1" />
<ShapeMatchingRotationFinder showRotations="true" axisToFlip="1" />
<PrecomputedConstraintCorrection rotations="1" />
<Node name="Visu">
<OglModel name="Visual" color="green" />
<IdentityMapping input="@.." output="@Visual" />
</Node>
<Point group="2" />
<PointCollisionModel group="2" />
</Node>
</Node>
34 changes: 24 additions & 10 deletions examples/RotationFinder.scn
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
<Node name="root" gravity="0.0 -2.0 0.0" dt="0.04">
<CollisionPipeline verbose="0" />
<BruteForceDetection name="N2" />
<CollisionResponse name="Response" />
<RequiredPlugin name="SofaBoundaryCondition"/>
<RequiredPlugin name="SofaDeformable"/>
<RequiredPlugin name="SofaEngine"/>
<RequiredPlugin name="SofaGeneralDeformable"/>
<RequiredPlugin name="SofaImplicitOdeSolver"/>
<RequiredPlugin name="SofaMeshCollision"/>
<RequiredPlugin name="SofaOpenglVisual"/>
<RequiredPlugin name="SofaLoader"/>
<RequiredPlugin name="ShapeMatchingPlugin"/>

<DefaultPipeline verbose="0" draw="0" />
<BruteForceBroadPhase />
<BVHNarrowPhase />
<DefaultContactManager name="Response" />
<NewProximityIntersection alarmDistance="0.002" contactDistance="0.001" />
<DefaultAnimationLoop />
<DefaultVisualManagerLoop />
<Node name="Floor">
<RegularGrid nx="2" ny="1" nz="2" xmin="20" xmax="-20" ymin="-3.05" ymax="-3.05" zmin="-20" zmax="20" />
<RegularGridTopology nx="2" ny="1" nz="2" xmin="20" xmax="-20" ymin="-3.05" ymax="-3.05" zmin="-20" zmax="20" />
<MechanicalObject />
<!--
<Triangle simulated="0" moving="0" />
Expand All @@ -17,24 +30,25 @@
</Node>
</Node>
<Node name="SquareCloth1">
<EulerImplicit />
<EulerImplicitSolver />
<CGLinearSolver iterations="10" threshold="0.000001" tolerance="1e-5"/>
<RegularGrid nx="25" ny="1" nz="25" xmin="12" xmax="-12" ymin="7" ymax="7" zmin="-12" zmax="12" />
<RegularGridTopology nx="25" ny="1" nz="25" xmin="12" xmax="-12" ymin="7" ymax="7" zmin="-12" zmax="12" />
<MechanicalObject />
<UniformMass rayleighMass="0.05" totalmass="100" />
<UniformMass rayleighMass="0.05" totalMass="100" />
<BoxConstraint box="-12.1 7 11.9 -9.9 7 12.1 9.9 7 11.9 12.1 7 12.1" />
<MeshSpringForceField name="Springs" stiffness="1000" damping="0" />
<QuadBendingSprings name="Bend" stiffness="2000" damping="1" />
<SphereForceField stiffness="1000" damping="1" center="0 1 3" radius="4" />
<PlaneForceField stiffness="1000" damping="20" normal="0 1 0" d="-3" />
<RotationFinder showRotations="true" axisToFlip="1" />
<ShapeMatchingRotationFinder showRotations="true" axisToFlip="1" />
<Node name="Visu">
<OglModel name="Visual" color="green" />
<IdentityMapping input="@.." output="@Visual" />
</Node>
<Triangle />
<TriangleCollisionModel />
</Node>
<Node name="Sphere">
<OglModel name="Visual" fileMesh="mesh/sphere.obj" scale="3.95" dx="0" dy="1" dz="3" color="blue" />
<MeshOBJLoader name='myLoader' filename='mesh/sphere.obj' scale="3.95" translation="0 1 3" />
<OglModel name="Visual"src='@myLoader' color="blue"/>
</Node>
</Node>
6 changes: 2 additions & 4 deletions examples/ShapeMatchingForceField.scn
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<MeshTopology src="@loader" />
<MechanicalObject src="@loader" scale="1" dz="10" />
<UniformMass totalMass="3" />
<RotationFinder />
<RotationFinder neighborhoodLevel="1" radius="0.1" />
<ShapeMatchingForceField name="ShapeMatching" stiffness="100" />
<MeshOBJLoader name="loader" filename="mesh/dragon.obj" />
<Node name="Visu">
Expand All @@ -28,9 +28,7 @@
<Node name="Surf">
<MeshTopology src="@../loader" />
<MechanicalObject src="@../loader" dz="10" />
<TriangleCollisionModel contactStiffness="1000" />
<LineCollisionModel contactStiffness="1000" />
<PointCollisionModel contactStiffness="1000" />
<SphereCollisionModel contactStiffness="10" radius="0.1"/>
<IdentityMapping />
</Node>
</Node>
Expand Down

0 comments on commit ede540c

Please sign in to comment.