Home › Forum › SOFA › Using SOFA › Obj files specifications
Tagged: 64_bits, Linux_ubuntu, SOFA_1706
- This topic has 14 replies, 3 voices, and was last updated 7 years ago by Hugo.
-
AuthorPosts
-
10 October 2017 at 19:52 #10053wendyarangoBlocked
Hi,
I have a little question: do obj files need any specification, like version or something like that, to work on SOFA?I’ve tried exporting files from Fusion 360. Everything had been well until I got a file created in other software. I imported it in Fusion and later I exported and loaded it in SOFA, but I got a segmentation fault.
I tried to publish the error but the page doesn’t let me, it says it’s spam. Otherwise, I had let it here so you could have a look of that strange thing that’s happening.
Thanks a lot.
10 October 2017 at 20:23 #10054HugoKeymasterHi Wendy,
Could you post your scene file please?
And indeed the error output would be useful as well.
If it doesn’t work, you can send it through the contact form.Best,
H
10 October 2017 at 20:43 #10055wendyarangoBlocked<?xml version="1.0" ?> <Node name="lroot" dt="0.02" gravity="0 0 0" > <LCPConstraintSolver tolerance="1e-3" maxIt="1000" initial_guess="false" build_lcp="false" printLog="0" mu="0.2"/> <DefaultPipeline name="CollisionPipeline" verbose="0" /> <CollisionPipeline depth="15" verbose="0" draw="0" /> <BruteForceDetection name="N2" /> <DefaultContactManager name="collision response" response="default" /> <CollisionResponse response="default" /> <MinProximityIntersection name="Proximity" alarmDistance="0.8" contactDistance="0.5" /> <CollisionResponse name="Response" response="FrictionContact" /> <CollisionGroup /> <DiscreteIntersection/> <Node name="AttachOneWay"> <Node name="Intern"> <EulerImplicitSolver name="cg_odesolver" /> <CGLinearSolver name="linear solver" iterations="25" tolerance="1e-09" threshold="1e-09" /> <MeshGmshLoader name="meshLoader" filename="./cyst.msh" /> <TetrahedronSetTopologyContainer name="topo" src="@meshLoader" /> <MechanicalObject name="dofs" src="@meshLoader" /> <TetrahedronSetGeometryAlgorithms template="Vec3d" name="GeomAlgo" /> <DiagonalMass name="computed using mass density" massDensity="1" /> <TetrahedralCorotationalFEMForceField template="Vec3d" name="FEM" method="large" poissonRatio="0.3" youngModulus="3000" computeGlobalMatrix="0" /> <!--<FixedConstraint name="FixedConstraint" indices="3 39 64" />--> <Node name="Visu" tags="Visual"> <OglModel name="VisualModel" fileMesh="./cyst.obj" /> <BarycentricMapping name="visual mapping" input="@../dofs" output="@VisualModel" /> </Node> <Node name="Surf"> <MeshObjLoader name="loader" filename="./cyst.obj" /> <Mesh src="@loader" /> <MechanicalObject src="@loader" name="CollisModel" /> <Triangle selfCollision="0" /> <Line selfCollision="0" /> <Point selfCollision="0" /> <BarycentricMapping input="@.." output="@." /> </Node> </Node> <Node name="Extern"> <EulerImplicit name="cg_odesolver" printLog="false" /> <CGLinearSolver iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" /> <MeshGmshLoader name="loader" filename="./ovary_xx.msh" /> <MechanicalObject src="@loader" name="Volume" /> <TetrahedronSetTopologyContainer name="Tetra_topo" src="@loader" /> <TetrahedronSetTopologyModifier name="Modifier" /> <TetrahedronSetTopologyAlgorithms name="TopoAlgo" template="Vec3d" /> <TetrahedronSetGeometryAlgorithms name="GeomAlgo" template="Vec3d" /> <DiagonalMass massDensity="0.5" /> <!--<FixedPlaneConstraint direction="0 0 1" dmin="-0.1" dmax="0.1" />--> <FixedConstraint indices="0 200 2325 2138" /> <TetrahedralCorotationalFEMForceField name="FEM" youngModulus="5000" poissonRatio="0.3" method="large" /> <Node name="T"> <TriangleSetTopologyContainer name="Triangle_topo" /> <TriangleSetTopologyModifier name="Modifier" /> <TriangleSetTopologyAlgorithms template="Vec3d" name="TopoAlgo" /> <TriangleSetGeometryAlgorithms template="Vec3d" name="GeomAlgo" /> <Tetra2TriangleTopologicalMapping input="@../Tetra_topo" output="@Triangle_topo" /> <TriangularFEMForceField name="FEM" youngModulus="5000" poissonRatio="0.3" method="large" /> <TriangularBendingSprings name="FEM-Bend" stiffness="300" damping="1.0" /> <TrianglePressureForceField normal="0 0 1" dmin="0.9" dmax="1.1" pressure="0.4 0 0" /> <TriangleSet /> <Node name="Visu"> <VisualModel name="Visual" color="blue" /> <IdentityMapping input="@../../Volume" output="@Visual" /> </Node> </Node> </Node> <CustomAttachConstraint object1="@Extern" object2="@Intern" radius="0.1" indices1="32 33 34 35 36 37 38 39 40 41 42 43 44 45 46" indices2="0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15" IsBreakable="true" minDistance = "0.01"/> </Node> </Node>
10 October 2017 at 20:49 #10057wendyarangoBlockedHi Hugo. It doesn’t let me neither post it nor send it by internal message.
-> /home/bgarcial/Documents/sofa/build_cgal/lib/libSofaGuiQt.so.17.06.01(sofa::gui::qt::RealGUI::step()+0xd4) [0x7f2c87eef654]
-> /home/bgarcial/Documents/sofa/build_cgal/lib/libSofaGuiQt.so.17.06.01(+0x2842e4) [0x7f2c87e862e4]
-> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QMetaObject::activate(QObject*, int, int, void**)+0x7e6) [0x7f2c6ea272a6]
-> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QTimer::timerEvent(QTimerEvent*)+0x32) [0x7f2c6ea33622]
-> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QObject::event(QEvent*)+0x64) [0x7f2c6ea28054]
-> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(QApplicationPrivate::notify_helper(QObject*, QEvent*)+0x8c) [0x7f2c6fdbbc8c]
-> /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5(QApplication::notify(QObject*, QEvent*)+0x3d6) [0x7f2c6fdc0e56]
-> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QCoreApplication::notifyInternal(QObject*, QEvent*)+0x6d) [0x7f2c6e9ffc2d]
-> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QTimerInfoList::activateTimers()+0x54d) [0x7f2c6ea4c1ad]
-> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(+0x2b4661) [0x7f2c6ea4c661]
-> /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x254) [0x7f2c6c3c7e04]
-> /lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x49048) [0x7f2c6c3c8048]
-> /lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7f2c6c3c80ec]
-> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)+0x5c) [0x7f2c6ea4c98c]
-> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>)+0x11b) [0x7f2c6e9fe96b]
-> /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(QCoreApplication::exec()+0x81) [0x7f2c6ea050e1]
-> /home/bgarcial/Documents/sofa/build_cgal/lib/libSofaGuiQt.so.17.06.01(sofa::gui::qt::RealGUI::mainLoop()+0x10c) [0x7f2c87ee590c]
-> /home/bgarcial/Documents/sofa/build_cgal/lib/libSofaGuiCommon.so.17.06.01(sofa::gui::GUIManager::MainLoop(boost::intrusive_ptr<sofa::simulation::Node>, char const*)+0x66) [0x7f2c879f3ef6]
-> ./runSofa(main+0x1cae) [0x40909e]
-> /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f2c6dbd0f45]
-> ./runSofa() [0x40665d]
Segmentation fault (core dumped)10 October 2017 at 20:53 #10058HugoKeymasterOk, are both ovary_xx.msh and cyst.msh created from Fusion ? Are they volumetric meshes (with nodes, edges, faces and tetra) ?
But, the issue might simply come from the node “Extern” : you need to set the TetrahedronSetTopologyContainer before the MechanicalObject.
Cheers,
H
10 October 2017 at 20:58 #10059wendyarangoBlockedThis is the first part… I could only send it like this. The last reply I did has the second part.
-> /home/bgarcial/Documents/sofa/build_cgal/lib/libSofaHelper.so.17.06.01(sofa::helper::BackTrace::dump()+0x20) [0x7f2c72290860]
-> /home/bgarcial/Documents/sofa/build_cgal/lib/libSofaHelper.so.17.06.01(sofa::helper::BackTrace::sig(int)+0x17c) [0x7f2c72290c0c]
-> /lib/x86_64-linux-gnu/libc.so.6(+0x36cb0) [0x7f2c6dbe5cb0]
-> /home/bgarcial/Documents/sofa/build_cgal10 October 2017 at 21:04 #10060wendyarangoBlockedYeah… Both are created in Fusion and both are volumetric meshes.
I tried what you said and it still doesn’t work. I tried to put cyst.msh and another .msh file and it worked. When I tried again with ovary_xx.msh, it died! The thing is that someone sent me the file with the ovary, I loaded it on Fusion, made some modifications and exported it again as .obj file… But it simply doesn’t work.
10 October 2017 at 21:05 #10061HugoKeymasterHey Wendy,
did you notice my post?
Is that helping in anyway?10 October 2017 at 21:06 #10062HugoKeymasterOkay,
sorry I did not notice your post.
Are you allowed to share your mesh with us?Best,
Hugo
10 October 2017 at 21:21 #10063wendyarangoBlockedHugo,
I don’t know how to share files by this medium.
Should I send them by internal message?
Thanks.
10 October 2017 at 21:29 #10064HugoKeymasterOr wetransfer.
17 October 2017 at 18:46 #10078Wendy María ArangoBlockedHi Hugo… Where do I send the scene?
I still have that weird error. With some changes, this is what I’ve got.
[WARNING] [TriangularFEMForceField(FEM)] TopologyDataHandler SIZE MISMATCH in Data edgeInfo: 1 Edge ADDED starting from index 0 while vector size is 1974 [WARNING] [TriangularBendingSprings(FEM-Bend)] TopologyDataHandler SIZE MISMATCH in Data edgeInfo: 1 Edge ADDED starting from index 0 while vector size is 1974 *** Error in
./runSofa’: malloc(): memory corruption (fast): 0x00000000075f8910 ***
########## SIG 6 – Killed`
May I send you the scene and the .obj files to see if you can tell me what’s the error with it?
thank you!
6 November 2017 at 10:45 #10116HugoKeymasterHey Wendy,
Well you can send it (the scene but mainly the associated files/meshes) through wetransfer (as mentioned above) or send it directly to the consortium email (available here, down the page).
Cheers,
Hugo
7 November 2017 at 16:28 #10119Wendy María ArangoBlockedHi Hugo, thought you had forgotten me xD
Anyhow, thanks for answering.It happens that the files were made in Autodesk Maya, so in Autodesk Fusion I had to turn them into a different file specification (stl) so I could make some changes and, after all that, I exported them as obj files again.
Later, if you want, I can tell you the process. Maybe it can help somebody in the future.
BTW, I’ve got another question:
There’s this function in FixedConstraint called removeConstraint. How can I call it in a XML scene?Thanks again.
7 November 2017 at 18:56 #10120HugoKeymasterHi Wendy,
Sorry for the delay 😉 but I did not forgot you, no worries!
1) did you solve your initial problem, the crash above mentioned
2) about your other question, no functions in classes cannot be called in XML. Using Python, functions in classes can be bound (slight difficult) but it could be feasible (but I am no expert).
Cheers,
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.