Skip to content

Commit ede540c

Browse files
committed
update scenes
1 parent e476d28 commit ede540c

File tree

3 files changed

+57
-31
lines changed

3 files changed

+57
-31
lines changed

examples/ConstraintRotationFinder.scn

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,62 @@
11
<Node name="root" gravity="0.0 -2.0 0.0" dt="0.04">
2+
<RequiredPlugin name="SofaBoundaryCondition"/>
3+
<RequiredPlugin name="SofaConstraint"/>
4+
<RequiredPlugin name="SofaDeformable"/>
5+
<RequiredPlugin name="SofaEngine"/>
6+
<RequiredPlugin name="SofaGeneralDeformable"/>
7+
<RequiredPlugin name="SofaImplicitOdeSolver"/>
8+
<RequiredPlugin name="SofaLoader"/>
9+
<RequiredPlugin name="SofaMeshCollision"/>
10+
<RequiredPlugin name="SofaOpenglVisual"/>
11+
<RequiredPlugin name="ShapeMatchingPlugin"/>
12+
213
<FreeMotionAnimationLoop initial_guess="true" displayTime="1" />
3-
<CollisionPipeline verbose="0" />
4-
<BruteForceDetection name="N2" />
14+
<DefaultPipeline verbose="0" draw="0" />
15+
<BruteForceBroadPhase />
16+
<BVHNarrowPhase />
517
<LocalMinDistance name="Proximity" alarmDistance="0.50" contactDistance="0.25" />
6-
<CollisionResponse name="Response" response="FrictionContact" />
18+
<DefaultContactManager name="Response" response="FrictionContact" />
719
<LCPConstraintSolver maxIt="1000" tolerance="0.001" />
20+
<DefaultAnimationLoop />
21+
<DefaultVisualManagerLoop />
822
<Node name="Floor">
9-
<RegularGrid nx="2" ny="1" nz="2" xmin="20" xmax="-20" ymin="-3.05" ymax="-3.05" zmin="-20" zmax="20" />
23+
<RegularGridTopology nx="2" ny="1" nz="2" xmin="20" xmax="-20" ymin="-3.05" ymax="-3.05" zmin="-20" zmax="20" />
1024
<MechanicalObject />
11-
<Triangle simulated="0" moving="0" group="1" />
12-
<Line simulated="0" moving="0" group="1" />
13-
<Point simulated="0" moving="0" group="1" />
25+
<TriangleCollisionModel simulated="0" moving="0" group="1" />
26+
<LineCollisionModel simulated="0" moving="0" group="1" />
27+
<PointCollisionModel simulated="0" moving="0" group="1" />
1428
<Node name="Visu">
1529
<OglModel name="Visual" color="red" />
1630
<IdentityMapping input="@.." output="@Visual" />
1731
</Node>
1832
</Node>
1933
<Node name="Sphere">
20-
<MeshObjLoader filename="mesh/sphere.obj" name="loader" />
21-
<Mesh src="@loader" />
34+
<MeshOBJLoader filename="mesh/sphere.obj" name="loader" />
35+
<MeshTopology src="@loader" />
2236
<MechanicalObject src="@loader" scale="3.95" dx="0" dy="1" dz="3" />
23-
<Triangle simulated="0" moving="0" group="1" />
24-
<Line simulated="0" moving="0" group="1" />
25-
<Point simulated="0" moving="0" group="1" />
37+
<TriangleCollisionModel simulated="0" moving="0" group="1" />
38+
<LineCollisionModel simulated="0" moving="0" group="1" />
39+
<PointCollisionModel simulated="0" moving="0" group="1" />
2640
<Node name="Visu">
2741
<OglModel name="Visual" color="blue" />
2842
<IdentityMapping input="@.." output="@Visual" />
2943
</Node>
3044
</Node>
3145
<Node name="SquareCloth1">
32-
<EulerImplicit rayleighMass="0.05" />
46+
<EulerImplicitSolver rayleighMass="0.05" />
3347
<CGLinearSolver iterations="10" threshold="0.000001" tolerance="1e-5"/>
34-
<RegularGrid nx="15" ny="1" nz="15" xmin="12" xmax="-12" ymin="7" ymax="7" zmin="-12" zmax="12" />
48+
<RegularGridTopology nx="15" ny="1" nz="15" xmin="12" xmax="-12" ymin="7" ymax="7" zmin="-12" zmax="12" />
3549
<MechanicalObject />
36-
<UniformMass totalmass="100" />
50+
<UniformMass totalMass="100" />
3751
<BoxConstraint box="-12.1 7 11.9 -9.9 7 12.1 9.9 7 11.9 12.1 7 12.1" />
3852
<MeshSpringForceField name="Springs" stiffness="1000" damping="0" />
3953
<QuadBendingSprings name="Bend" stiffness="2000" damping="1" />
40-
<RotationFinder showRotations="true" axisToFlip="1" />
54+
<ShapeMatchingRotationFinder showRotations="true" axisToFlip="1" />
4155
<PrecomputedConstraintCorrection rotations="1" />
4256
<Node name="Visu">
4357
<OglModel name="Visual" color="green" />
4458
<IdentityMapping input="@.." output="@Visual" />
4559
</Node>
46-
<Point group="2" />
60+
<PointCollisionModel group="2" />
4761
</Node>
4862
</Node>

examples/RotationFinder.scn

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
<Node name="root" gravity="0.0 -2.0 0.0" dt="0.04">
2-
<CollisionPipeline verbose="0" />
3-
<BruteForceDetection name="N2" />
4-
<CollisionResponse name="Response" />
2+
<RequiredPlugin name="SofaBoundaryCondition"/>
3+
<RequiredPlugin name="SofaDeformable"/>
4+
<RequiredPlugin name="SofaEngine"/>
5+
<RequiredPlugin name="SofaGeneralDeformable"/>
6+
<RequiredPlugin name="SofaImplicitOdeSolver"/>
7+
<RequiredPlugin name="SofaMeshCollision"/>
8+
<RequiredPlugin name="SofaOpenglVisual"/>
9+
<RequiredPlugin name="SofaLoader"/>
10+
<RequiredPlugin name="ShapeMatchingPlugin"/>
11+
12+
<DefaultPipeline verbose="0" draw="0" />
13+
<BruteForceBroadPhase />
14+
<BVHNarrowPhase />
15+
<DefaultContactManager name="Response" />
516
<NewProximityIntersection alarmDistance="0.002" contactDistance="0.001" />
17+
<DefaultAnimationLoop />
18+
<DefaultVisualManagerLoop />
619
<Node name="Floor">
7-
<RegularGrid nx="2" ny="1" nz="2" xmin="20" xmax="-20" ymin="-3.05" ymax="-3.05" zmin="-20" zmax="20" />
20+
<RegularGridTopology nx="2" ny="1" nz="2" xmin="20" xmax="-20" ymin="-3.05" ymax="-3.05" zmin="-20" zmax="20" />
821
<MechanicalObject />
922
<!--
1023
<Triangle simulated="0" moving="0" />
@@ -17,24 +30,25 @@
1730
</Node>
1831
</Node>
1932
<Node name="SquareCloth1">
20-
<EulerImplicit />
33+
<EulerImplicitSolver />
2134
<CGLinearSolver iterations="10" threshold="0.000001" tolerance="1e-5"/>
22-
<RegularGrid nx="25" ny="1" nz="25" xmin="12" xmax="-12" ymin="7" ymax="7" zmin="-12" zmax="12" />
35+
<RegularGridTopology nx="25" ny="1" nz="25" xmin="12" xmax="-12" ymin="7" ymax="7" zmin="-12" zmax="12" />
2336
<MechanicalObject />
24-
<UniformMass rayleighMass="0.05" totalmass="100" />
37+
<UniformMass rayleighMass="0.05" totalMass="100" />
2538
<BoxConstraint box="-12.1 7 11.9 -9.9 7 12.1 9.9 7 11.9 12.1 7 12.1" />
2639
<MeshSpringForceField name="Springs" stiffness="1000" damping="0" />
2740
<QuadBendingSprings name="Bend" stiffness="2000" damping="1" />
2841
<SphereForceField stiffness="1000" damping="1" center="0 1 3" radius="4" />
2942
<PlaneForceField stiffness="1000" damping="20" normal="0 1 0" d="-3" />
30-
<RotationFinder showRotations="true" axisToFlip="1" />
43+
<ShapeMatchingRotationFinder showRotations="true" axisToFlip="1" />
3144
<Node name="Visu">
3245
<OglModel name="Visual" color="green" />
3346
<IdentityMapping input="@.." output="@Visual" />
3447
</Node>
35-
<Triangle />
48+
<TriangleCollisionModel />
3649
</Node>
3750
<Node name="Sphere">
38-
<OglModel name="Visual" fileMesh="mesh/sphere.obj" scale="3.95" dx="0" dy="1" dz="3" color="blue" />
51+
<MeshOBJLoader name='myLoader' filename='mesh/sphere.obj' scale="3.95" translation="0 1 3" />
52+
<OglModel name="Visual"src='@myLoader' color="blue"/>
3953
</Node>
4054
</Node>

examples/ShapeMatchingForceField.scn

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<MeshTopology src="@loader" />
1919
<MechanicalObject src="@loader" scale="1" dz="10" />
2020
<UniformMass totalMass="3" />
21-
<RotationFinder />
21+
<RotationFinder neighborhoodLevel="1" radius="0.1" />
2222
<ShapeMatchingForceField name="ShapeMatching" stiffness="100" />
2323
<MeshOBJLoader name="loader" filename="mesh/dragon.obj" />
2424
<Node name="Visu">
@@ -28,9 +28,7 @@
2828
<Node name="Surf">
2929
<MeshTopology src="@../loader" />
3030
<MechanicalObject src="@../loader" dz="10" />
31-
<TriangleCollisionModel contactStiffness="1000" />
32-
<LineCollisionModel contactStiffness="1000" />
33-
<PointCollisionModel contactStiffness="1000" />
31+
<SphereCollisionModel contactStiffness="10" radius="0.1"/>
3432
<IdentityMapping />
3533
</Node>
3634
</Node>

0 commit comments

Comments
 (0)