Home › Forum › SOFA › Using SOFA › 2d Incision with Phantom omni
Tagged: 64_bits, Incision2D, Plugin_Geomagic, SOFA_2006, Windows_10
- This topic has 3 replies, 2 voices, and was last updated 3 years, 10 months ago by Hugo.
-
AuthorPosts
-
14 January 2021 at 13:07 #18220torriBlocked
Hi everyone,
I am a bit new in SOFA, and hope you could help me out.
I try to make a incision with the Phantom Omni. I use a 2d model and the interaction between phantom and model works well. When i do the incision with the mouse, the incision is done, but when i touch the model with the phantom, the program stops and turns out. The output of sofa is:########## SIG 11 – SIGSEGV: segfault ####
are there any solution for this problem?
This is my code:
<?xml version="1.0" ?> <Node name="root" dt="0.1" showBoundingTree="0" gravity="0 0 0" > <RequiredPlugin name="SofaOpenglVisual"/> <RequiredPlugin pluginName='SofaHaptics'/> <RequiredPlugin pluginName='SofaSparseSolver'/> <RequiredPlugin pluginName='SofaMiscCollision'/> <VisualStyle displayFlags="showCollisionModels" /> <RequiredPlugin name="Geomagic plugin" pluginName="Geomagic" /> <DefaultPipeline name="pipeline" depth="6" verbose="0"/> <BruteForceDetection name="detection" /> <DefaultContactManager name="response" response="FrictionContact" /> <MinProximityIntersection name="Proximity" alarmDistance="1" contactDistance="0.05"/> <FreeMotionAnimationLoop/> <LCPConstraintSolver tolerance="0.001" maxIt="1000"/> <GeomagicDriver name="GeomagicDevice" deviceName="Default Device" scale="1" positionBase="0 0 8" orientationBase="0.707 0 0 0.707" drawDevice="0" drawDeviceFrame="0" forceFeedBack="@Instrument/LCPFF1"/> <Node name="Mesh"> <EulerImplicitSolver name="cg_odesolver" printLog="false" rayleighStiffness="0.1" rayleighMass="0.1" /> <CGLinearSolver template="GraphScattered" name="linear solver" iterations="25" tolerance="1.0e-9" threshold="1.0e-9" /> <MeshGmshLoader name="loader" filename="mesh/cube.msh" createSubelements="true"/> <MechanicalObject src="@loader" name="default4" scale3d="7 4 5"/> <FixedConstraint template="Vec3d" name="Fixed Dofs" indices="0 4 20 24 70 74" drawSize="0" /> <FixedPlaneConstraint template="Vec3d" name="defaultPlane" direction="0 0 1" dmin="-15"/> <TriangleSetTopologyContainer src="@loader" name="Triangle_topo" /> <TriangleSetTopologyModifier name="Modifier" /> <TriangleSetTopologyAlgorithms name="TopoAlgo" /> <TriangleSetGeometryAlgorithms name="GeomAlgo" /> <DiagonalMass name="default5" massDensity="1.5" /> <TriangularFEMForceField name="FEM" youngModulus="60" poissonRatio="0.35" method="large" showStressValue="false" showStressVector="false" showFracturableTriangles="true" hosfordExponant="10.0" criteriaValue="10000" computePrincipalStress="true" /> <PrecomputedConstraintCorrection recompute="true"/> <TriangleCollisionModel name="cmTriangles" contactStiffness="5000" /> <LineCollisionModel name="cmLines" contactStiffness="5000" /> <PointCollisionModel name="cmPoints" contactStiffness="5000" /> <Node name="edges"> <EdgeSetTopologyContainer name="Edge_topo" /> <EdgeSetTopologyModifier name="Modifier" /> <EdgeSetTopologyAlgorithms template="Vec3d" name="TopoAlgo" /> <EdgeSetGeometryAlgorithms template="Vec3d" name="GeomAlgo" drawEdges="1" /> <Triangle2EdgeTopologicalMapping name="Mapping" input="@../Triangle_topo" output="@Edge_topo" /> </Node> <Node > <OglModel name="Visual" material="Default Diffuse 1 0 1 0 0.75 Ambient 0 1 1 1 1 Specular 1 1 1 0 1 Emissive 0 1 1 0 1 Shininess 1 100"/> <IdentityMapping name="default8" input="@.." output="@Visual" /> </Node> </Node> <Node name="Omni"> <MechanicalObject template="Rigid3" name="DOFs" position="@GeomagicDevice.positionDevice"/> <MechanicalStateController template="Rigid3" listening="true" mainDirection="-1.0 0.0 0.0" handleEventTriggersUpdate="true"/> </Node> <Node name="Instrument" > <EulerImplicitSolver rayleighMass="0.01" rayleighStiffness="0.1" /> <SparseLDLSolver /> <MechanicalObject name="instrumentState" template="Rigid3" tags="GeomagicDevice" position="@../GeomagicDevice.positionBase"/> <UniformMass name="mass" totalMass="1" /> <RestShapeSpringsForceField stiffness='100000000' angularStiffness='100000000' external_rest_shape='@../Omni/DOFs' points='0' external_points='0'/> <LCPForceFeedback name="LCPFF1" activate="true" forceCoef="0.2"/> <LinearSolverConstraintCorrection /> <Node name="VisuTool" > <MeshObjLoader name="meshLoader_1" filename="Demos/Dentistry/data/mesh/dental_instrument.obj" handleSeams="1" /> <OglModel name="InstrumentVisualModel" src="@meshLoader_1" color="1.0 0.2 0.2 1.0" ry="-180" rz="-90" dz="3.5" dx="-0.3"/> <RigidMapping name="MM->VM mapping" input="@instrumentState" output="@InstrumentVisualModel" /> </Node> <Node name="CollisionModel" > <MeshObjLoader filename="Demos/Dentistry/data/mesh/dental_instrument_centerline.obj" name="loader"/> <MeshTopology src="@loader" name="InstrumentCollisionModel" /> <MechanicalObject src="@loader" name="instrumentCollisionState" ry="-180" rz="-90" dz="3.5" dx="-0.3"/> <LineCollisionModel contactStiffness="100"/> <PointCollisionModel contactStiffness="100"/> <RigidMapping name="MM->CM mapping" input="@instrumentState" output="@instrumentCollisionState" /> </Node> </Node> </Node>
14 January 2021 at 15:21 #18224HugoKeymasterDear
What you are aiming at doing is: cutting (topological change) and then solve constraints (contacts) with the cut parts ! It is not trivial. The engineering team from InfinyTech3D works on it, and is almost there. An issue seems to remain if you have contacts not properly updated during the topological change.
Stay tuned on the topology Pull-Requests on the master branch of SOFA!
Best,
Hugo
14 January 2021 at 17:39 #18225torriBlockedHi Hugo!
Thanks for your the help and for the speed of response. I will tune on the topology Pull-Requests on the master branch of SOFA!
Thanks again and best regards,
Daniele
1 February 2021 at 11:20 #18457 -
AuthorPosts
- You must be logged in to reply to this topic.