Home › Forum › SOFA › Using SOFA › [SOLVED] Problem with identifying the initial coordination and carving.
Tagged: 64_bits, SOFA_other, Windows_7
- This topic has 7 replies, 3 voices, and was last updated 7 years, 11 months ago by jnbrunet.
-
AuthorPosts
-
16 November 2016 at 15:05 #7780MermailBlocked
I’m new in using Sofa. Here I got two questions.
1. How to identify the initial coordination system of the visual model and collision model? In the demo program, there was no translation and rotation of the visual model and collision model. When I tried to set an initial rotation angle of them, say (0,180,90), both the visual model and collision model was rotated. However, the visual model and collision model did not match as there was translation difference. I suspected that the two models were rotated in different coordinate system. Is it possible to identify the coordinate system of visual model and collisioin model?
2. How to implment carving function?
Thanks!
Mermail24 November 2016 at 00:39 #7958HugoKeymasterHi Mingming,
Thank you for choosing and experimenting SOFA!
We would need more detail to answer you: what scene are you talking about?
on which object did you apply the rotation ?For topological changes, please see:
- https://www.sofa-framework.org/community/forum/topic/problem-with-carving-on-rigid-tissues/
- https://www.sofa-framework.org/community/forum/topic/how-to-incise-3d-object/
Cheers,
Hugo
24 November 2016 at 09:07 #7961MermailBlockedHi Hugo,
I am using the scene named <geomagic-rigidskull.scn>. I try to rotate the visual model and collision model because of the directional mismatch of my haptic device and the model.I move left on the haptic device,but the virtual instrument in the model go up;then I move down and get a left moving in the model.So how can I fix the problem?
I try to solve the problem by changing the position of visual model and collision model to (0,180,90),and they did not match.Are they using the different coordinate system?
What’s more,my sofa vision is old and I cannot find the example of rigid carving,can you send me a sample scene of rigid carving?It will be a great help.My e-mail address is 1119560360@qq.com
Thanks,
Mingming
24 November 2016 at 09:39 #7962HugoKeymasterDear Mingling,
I succeeded to get the right rotation for both by writing:
... <Node name="Tooth" > <Node name="VisualModel" > <OglModel name="ToothVisualModel" fileMesh="Demos/Dentistry/data/mesh/skull_and_teeth.obj" color="white" rotation="0 180 90"/> </Node> <Node name="CollisionModel" > <MeshObjLoader filename="Demos/Dentistry/data/mesh/skull_and_teeth_coarse.obj" name="loader" rotation="0 180 90"/> ...
Let me know if it works.
About carving, please look at the links I just sent you.Best,
Hugo
24 November 2016 at 10:17 #7965MermailBlockedHi Hugo,
I have tried you solution just now,the rotation is right,but the direction from the haptic device to the virtual instrument is still wrong.And when I use qtviewer to check the coordinate system of tooth,I found is differnet with the coordinate system of virtual instrument showed in behavioral model.So maybe this is the problem.How can I set the coordinate system of tooth or virtual instrument?
Best wishes,
Mingming
24 November 2016 at 10:36 #7967jnbrunetModeratorHi Mermail,
Just a suggestion here, you could try to set the attribute “drawDeviceFrame” to true in your GeomagicDriver node:
<GeomagicDriver name="GeomagicDevice" deviceName="Default Device" drawDeviceFrame="1" scale="1" drawDeviceFrame="1" positionBase="0 0 0" orientationBase="0 0.707 0 -0.707" />
This will draw the haptic tool on the scene. Maybe this could help you setting the good rotation and translation of your instrument. You can either move your instrument to the position of the haptic’s base, or move the haptic’s base postion (positionBase and orientationBase) to match your instrument.
Good luck,
Jean-Nico24 November 2016 at 11:59 #7977MermailBlockedHi Jean-Nico,
I followed your advise to visualize the haptic tool,soon I correct the rotation successfully.Thanks a lot for you and Hugo’s help.
Best wishes,
Mingming
24 November 2016 at 12:09 #7978jnbrunetModeratorAwesome!
I will mark this topic as resolved. Please do not hesitate if you have any further questions.
Jean-Nico
-
AuthorPosts
- You must be logged in to reply to this topic.