Home › Forum › SOFA › Using SOFA › [SOLVED] Mapping between BeamFEMForceField behavioral model and oglmodel
Tagged: 64_bits, SOFA_1608, visual mapping, Windows_7
- This topic has 3 replies, 3 voices, and was last updated 7 years, 4 months ago by shang.
-
AuthorPosts
-
21 May 2017 at 02:44 #9139shangBlocked
Hi every,
Does any knows that how to map between soft bodys.
I am simulating a soft catheter using BeamFEMForceField, and I want to give it a visual model, but the data mapping seems to occur some problems, and I have tried BarycentricMapping, IdentityMapping, RidgidMapping, BarycentricMapping happend to occurred the node creation failed. RigidMapping cannot mapping the deformable model data to the visual model, because the visual model is static while the forcefield is working during the simulation.
And I tried the IdentityMapping, but the visual mapping looks weird like this below
And the XML content is like below:
<Node name="root" dt="0.01"> <VisualStyle displayFlags="showBehaviorModels showForceFields showCollisionModels" /> <CollisionPipeline depth="6" verbose="0" draw="0" /> <BruteForceDetection name="N2" /> <MinProximityIntersection name="Proximity" alarmDistance="0.03" contactDistance="0.02" /> <CollisionResponse name="Response" response="default" /> <CollisionGroup name="Group" /> <Node name="beam"> <EulerImplicit rayleighStiffness="0" printLog="false" /> <CGLinearSolver template="GraphScattered" iterations="20" threshold="1e-008" tolerance="1e-5" /> <MechanicalObject template="Rigid" name="catheterDOFs" position="0 0 0 0 0 0 1 0.5 0 0 0 0 0 1 1 0 0 0 0 0 1 1.5 0 0 0 0 0 1 2 0 0 0 0 0 1 2.5 0 0 0 0 0 1 3 0 0 0 0 0 1 7 0 0 0 0 0 1 11 0 0 0 0 0 1 14 0 0 0 0 0 1 17 0 0 0 0 0 1 20 0 0 0 0 0 1 23 0 0 0 0 0 1 26 0 0 0 0 0 1 29 0 0 0 0 0 1 32 0 0 0 0 0 1 35 0 0 0 0 0 1 38 0 0 0 0 0 1 41 0 0 0 0 0 1 44 0 0 0 0 0 1 47 0 0 0 0 0 1 50 0 0 0 0 0 1 " /> <Mesh name="lines" lines="0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10 11 11 12 12 13 13 14 14 15 15 16 16 17 17 18 18 19 19 20 20 21" /> <FixedConstraint name="FixedConstraint" indices="0" /> <UniformMass mass="1 1 0.01 0 0 0 0.1 0 0 0 0.1" printLog="false" /> <BeamFEMForceField name="FEM" radius="0.1" youngModulus="2000000000" poissonRatio="0.89"/> <Node name="Collision"> <CylinderGridTopology name="coli" nx="5" ny="5" nz="115" length="21" radius="0.05" axis="1 0 0" /> <MechanicalObject /> <BeamLinearMapping isMechanical="true" /> <Triangle /> </Node> <Node name="visu"> <OglModel name="catheterModel" fileMesh="mesh/cylinder_65_cm.obj" rotation="0 0 -90" scale3d="1 10 1"/> <IdentityMapping template="Rigid3d,ExtVec3f" name="MM->VM mapping" input="@../catheterDOFs" output="@catheterModel" /> </Node> <PythonScriptController name="catheter" filename="E:/sofa-engine/sofa/applications/plugins/Geomagic/scenes/BeamFEMScript.py" classname="catheter"/> </Node> </Node>
I want to know how to find a proper visual mapping for the visual mapping, anyone helps me, Thanks very much!
30 May 2017 at 16:21 #9224rtriviBlockedHey !
May I ask you to check the orientation of your catheter ?
In particular could you tell me if the x-axis of your catheter’s beams is the same as the global sofa x-axis ?To see your beams reference frame, in your viewer you just have to check Force Fields and uncheck any other option.
To see Sofa reference frame, just click on “r” on your keybord13 July 2017 at 17:55 #978914 July 2017 at 04:10 #9792shangBlockedok,Hugo, it’s ok to close this topic!
-
AuthorPosts
- You must be logged in to reply to this topic.