Skip to content

Commit 4f0f30c

Browse files
authored
Example: apply SOFA's fix on TopologicalMapping (#124)
1 parent fa58d4d commit 4f0f30c

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

examples/3instruments_collis.scn

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -114,44 +114,31 @@
114114
</Node>
115115

116116
<Node name="VisuCatheter" activated="true">
117-
<MechanicalObject name="Quads" />
117+
<OglModel name="Visual" color="0.7 0.7 0.7" quads="@../ContainerCath.quads" material="texture Ambient 1 0.2 0.2 0.2 0.0 Diffuse 1 1.0 1.0 1.0 1.0 Specular 1 1.0 1.0 1.0 1.0 Emissive 0 0.15 0.05 0.05 0.0 Shininess 1 20"/>
118118
<QuadSetTopologyContainer name="ContainerCath" />
119119
<QuadSetTopologyModifier name="Modifier" />
120120
<QuadSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" />
121121
<Edge2QuadTopologicalMapping nbPointsOnEachCircle="10" radius="2" input="@../../topoLines_cath/meshLinesCath" output="@ContainerCath" flipNormals="true"/>
122122

123-
<AdaptiveBeamMapping name="VisuMapCath" useCurvAbs="1" printLog="0" interpolation="@../InterpolCatheter" input="@../DOFs" output="@Quads" isMechanical="false" />
124-
125-
<Node name="VisuOgl" activated="true">
126-
<OglModel name="Visual" color="0.7 0.7 0.7" quads="@../ContainerCath.quads" material="texture Ambient 1 0.2 0.2 0.2 0.0 Diffuse 1 1.0 1.0 1.0 1.0 Specular 1 1.0 1.0 1.0 1.0 Emissive 0 0.15 0.05 0.05 0.0 Shininess 1 20"/>
127-
<IdentityMapping input="@../Quads" output="@Visual"/>
128-
</Node>
123+
<AdaptiveBeamMapping name="VisuMapCath" useCurvAbs="1" printLog="0" interpolation="@../InterpolCatheter" input="@../DOFs" output="@Visual" />
129124
</Node>
130125

131126
<Node name="VisuGuide" activated="true">
132-
<MechanicalObject name="Quads" />
127+
<OglModel name="Visual" color="0.2 0.2 0.8" material="texture Ambient 1 0.2 0.2 0.2 0.0 Diffuse 1 1.0 1.0 1.0 1.0 Specular 1 1.0 1.0 1.0 1.0 Emissive 0 0.15 0.05 0.05 0.0 Shininess 1 20" quads="@../ContainerGuide.quads"/>
133128
<QuadSetTopologyContainer name="ContainerGuide" />
134129
<QuadSetTopologyModifier name="Modifier" />
135130
<QuadSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" />
136131
<Edge2QuadTopologicalMapping nbPointsOnEachCircle="10" radius="1" input="@../../topoLines_guide/meshLinesGuide" output="@ContainerGuide" flipNormals="true" listening="true"/>
137-
<AdaptiveBeamMapping name="visuMapGuide" useCurvAbs="1" printLog="0" interpolation="@../InterpolGuide" input="@../DOFs" output="@Quads" isMechanical="false" />
138-
<Node name="VisuOgl">
139-
<OglModel name="Visual" color="0.2 0.2 0.8" material="texture Ambient 1 0.2 0.2 0.2 0.0 Diffuse 1 1.0 1.0 1.0 1.0 Specular 1 1.0 1.0 1.0 1.0 Emissive 0 0.15 0.05 0.05 0.0 Shininess 1 20" quads="@../ContainerGuide.quads"/>
140-
<IdentityMapping input="@../Quads" output="@Visual"/>
141-
</Node>
132+
<AdaptiveBeamMapping name="visuMapGuide" useCurvAbs="1" printLog="0" interpolation="@../InterpolGuide" input="@../DOFs" output="@Visual" />
142133
</Node>
143134

144135
<Node name="VisuCoils" activated="true">
145-
<MechanicalObject name="Quads"/>
136+
<OglModel name="Visual" color="0.2 0.8 0.2" material="texture Ambient 1 0.2 0.2 0.2 0.0 Diffuse 1 1.0 1.0 1.0 1.0 Specular 1 1.0 1.0 1.0 1.0 Emissive 0 0.15 0.05 0.05 0.0 Shininess 1 20" quads="@../ContainerCoils.quads"/>
146137
<QuadSetTopologyContainer name="ContainerCoils" />
147138
<QuadSetTopologyModifier name="Modifier" />
148139
<QuadSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" />
149140
<Edge2QuadTopologicalMapping nbPointsOnEachCircle="10" radius="0.3" input="@../../topoLines_coils/meshLinesCoils" output="@ContainerCoils" flipNormals="true" listening="true" />
150-
<AdaptiveBeamMapping name="visuMapCoils" useCurvAbs="1" printLog="0" interpolation="@../InterpolCoils" input="@../DOFs" output="@Quads" isMechanical="false" />
151-
<Node name="VisuOgl">
152-
<OglModel name="Visual" color="0.2 0.8 0.2" material="texture Ambient 1 0.2 0.2 0.2 0.0 Diffuse 1 1.0 1.0 1.0 1.0 Specular 1 1.0 1.0 1.0 1.0 Emissive 0 0.15 0.05 0.05 0.0 Shininess 1 20" quads="@../ContainerCoils.quads"/>
153-
<IdentityMapping input="@../Quads" output="@Visual"/>
154-
</Node>
141+
<AdaptiveBeamMapping name="visuMapCoils" useCurvAbs="1" printLog="0" interpolation="@../InterpolCoils" input="@../DOFs" output="@Visual" />
155142
</Node>
156143
</Node>
157144

0 commit comments

Comments
 (0)