Home › Forum › SOFA › Programming with SOFA › [SOLVED] Custom Topological Mapping
Tagged: 64_bits, MacOS, SOFA_1512, subdivision, Topological mapping
- This topic has 1 reply, 2 voices, and was last updated 7 years, 9 months ago by Hugo.
-
AuthorPosts
-
31 August 2016 at 20:21 #7411mannyBlocked
I am trying to create a topological mapping Quad->Quad that performs Catmull-Clark subdivision and derives from TopologicalMapping. I am able to successfully created the refined mesh in init() and it appears on the screen however changes to the topology that I make in updateTopologicalMappingTopDown() seem to have no effect.
Also, the events that I see in the updateTopologicalMappingTopDown of my CatmullClarkSubdivisionMapping are not the same as the events that are forwarded to the Quad2TriangleTopologicalMapping even though they both have the same source mesh and theoretically should get identical events.
Is it possible to have two separate mappings have the same input model?
If so, is there something I am doing wrong in my scene file? (snippet below)The scene file I am using has this node structure:
<MechanicalObject name="MO" /> <HexahedronSetTopologyModifier removeIsolated="false" /> <HexahedronSetTopologyAlgorithms template="Vec3d" /> <HexahedronSetGeometryAlgorithms template="Vec3d" /> <Node name="quad"> <QuadSetTopologyContainer name="quadSurf" /> <QuadSetTopologyModifier removeIsolated="false" /> <QuadSetTopologyAlgorithms template="Vec3d" /> <QuadSetGeometryAlgorithms template="Vec3d" /> <Hexa2QuadTopologicalMapping flipNormals="0" object1="@../fatty_tissue-topology" object2="quadSurf" /> <Node name="trimodel"> <TriangleSetTopologyContainer name="triSurf" /> <TriangleSetTopologyModifier removeIsolated="false" /> <TriangleSetTopologyAlgorithms template="Vec3d" /> <TriangleSetGeometryAlgorithms template="Vec3d" /> <Quad2TriangleTopologicalMapping flipNormals="0" input="@../quadSurf" output="@triSurf" name="collinsionmodel"/> <TriangleModel bothSide="0" contactFriction="0" contactStiffness="500" group="1" moving="1" selfCollision="0" simulated="1" tags="SuturingSurface" /> </Node> <Node name="okey"> <QuadSetTopologyContainer name="quadSurf2" /> <QuadSetTopologyModifier removeIsolated="true" /> <QuadSetTopologyAlgorithms template="Vec3d" /> <QuadSetGeometryAlgorithms template="Vec3d" /> <CatmullClarkSubdivisionMapping object1="@../quadSurf" object2="@quadSurf2" /> <Node name="T"> <Node name="Visu"> <OglModel name="Visual" color="yellow" /> <IdentityMapping input="@../MO" output="@Visual" /> </Node> </Node> </Node> </Node>
23 January 2017 at 15:45 #8413HugoKeymasterHi manny,
I am sorry, I see nobody was able to answer your problem.
First of all, it appears you are using an old release of SOFA.Second, the rules for mappings changed. Mappings now use data input and output instead of object1 and object2 data.
Third, indeed, it is possible to have two separate mappings have the same input model.
Let me know if this helps. Do not hesitate to keep us update about your progress.
Cheers,Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.