Home › Forum › SOFA › Using SOFA › [SOLVED] Tetmeshing with CGAL and SOFA
Tagged: 64_bits, CGAL, Linux_ubuntu, SOFA_1608
- This topic has 3 replies, 2 voices, and was last updated 7 years, 10 months ago by Hugo.
-
AuthorPosts
-
13 January 2017 at 11:54 #8369jjcasmarBlocked
Hi… (sorry if this message is repeated, I had an error posting and I dont know if the message was posted)
I’m trying to build a tet mesh from an input mesh. Different mesh part need to have more tet resolution so I’m using the following approach:
-Generate different images with different values for each part
-Merge all the images
-Use the MeshGenerationFromImage with the merged image as inputRight now I’m only using one meshing criteria, but several will be used later.
Sofa is crashing and I don’t know why.
The scene is the following:
<?xml version="1.0"?> <Node name="Root" dt="0.02" > <RequiredPlugin name="image" printLog="1" pluginName="image" /> <RequiredPlugin name="CGALPlugin" printLog="1" pluginName="CGALPlugin" /> <VisualStyle name="visualStyle1" displayFlags="showAll" /> <DefaultPipeline name="DefaultCollisionPipeline" verbose="0" draw="0" depth="6" /> <BruteForceDetection name="Detection" /> <MinProximityIntersection name="Proximity" alarmDistance="0.3" contactDistance="0.2" /> <DefaultContactManager name="Response" response="default" /> <DefaultCollisionGroupManager name="Group" /> <MeshObjLoader name="fingersLoader" filename="/home/jjcasmar/Doctorado/HandMeshing/hand_hires_cut_fingers_closed.obj" /> <MeshToImageEngine template="ImageUC" name="fingersImage" position1="@fingersLoader.position" edges1="@fingersLoader.edges" triangles1="@fingersLoader.triangles" /> <MeshObjLoader name="palmLoader" filename="/home/jjcasmar/Doctorado/HandMeshing/hand_hires_cut_palm_closed.obj" /> <MeshToImageEngine template="ImageUC" name="palmImage" position1="@palmLoader.position" edges1="@palmLoader.edges" triangles1="@palmLoader.triangles" value1="2" insideValue1="2" /> <MergeImages template="ImageUC" name="merger" overlap="1" interpolation="Linear" nbImages="2" image1="@fingersImage.image" image2="@palmImage.image" transform1="@fingersImage.transform" transform2="@palmImage.transform" /> <ImageContainer template="ImageUC" name="handImage" image="@merger.image" transform="@merger.transform"/> <MeshGenerationFromImage template="Vec3d" name="generator" printLog="true" drawTetras="true" image="@handImage.image" transform="@handImage.transform" cellSize="2" facetAngle="30" facetSize="1" cellRatio="3" facetApproximation="1" ordering="0"/> <!-- label="1 2" labelCellSize="0.2 2" labelCellData="100 200"/>--> <MeshTopology name="mesh" position="@generator.outputPoints" tetrahedra="@generator.outputTetras" /> <!-- <VTKExporter name="meshExporter" listening="1" filename="hand.vtu" XMLformat="1" edges="0" tetras="1" exportAtBegin="1" overwrite="1" cellsDataFields="@generator.outputCellData"/>--> </Node>
and the error is the following
<?xml version="1.0"?> <Node name="Root" dt="0.02" > <RequiredPlugin name="image" printLog="1" pluginName="image" /> <RequiredPlugin name="CGALPlugin" printLog="1" pluginName="CGALPlugin" /> <VisualStyle name="visualStyle1" displayFlags="showAll" /> <DefaultPipeline name="DefaultCollisionPipeline" verbose="0" draw="0" depth="6" /> <BruteForceDetection name="Detection" /> <MinProximityIntersection name="Proximity" alarmDistance="0.3" contactDistance="0.2" /> <DefaultContactManager name="Response" response="default" /> <DefaultCollisionGroupManager name="Group" /> <MeshObjLoader name="fingersLoader" filename="/home/jjcasmar/Doctorado/HandMeshing/hand_hires_cut_fingers_closed.obj" /> <MeshToImageEngine template="ImageUC" name="fingersImage" position1="@fingersLoader.position" edges1="@fingersLoader.edges" triangles1="@fingersLoader.triangles" /> <MeshObjLoader name="palmLoader" filename="/home/jjcasmar/Doctorado/HandMeshing/hand_hires_cut_palm_closed.obj" /> <MeshToImageEngine template="ImageUC" name="palmImage" position1="@palmLoader.position" edges1="@palmLoader.edges" triangles1="@palmLoader.triangles" value1="2" insideValue1="2" /> <MergeImages template="ImageUC" name="merger" overlap="1" interpolation="Linear" nbImages="2" image1="@fingersImage.image" image2="@palmImage.image" transform1="@fingersImage.transform" transform2="@palmImage.transform" /> <ImageContainer template="ImageUC" name="handImage" image="@merger.image" transform="@merger.transform"/> <MeshGenerationFromImage template="Vec3d" name="generator" printLog="true" drawTetras="true" image="@handImage.image" transform="@handImage.transform" cellSize="2" facetAngle="30" facetSize="1" cellRatio="3" facetApproximation="1" ordering="0"/> <!-- label="1 2" labelCellSize="0.2 2" labelCellData="100 200"/>--> <MeshTopology name="mesh" position="@generator.outputPoints" tetrahedra="@generator.outputTetras" /> <!-- <VTKExporter name="meshExporter" listening="1" filename="hand.vtu" XMLformat="1" edges="0" tetras="1" exportAtBegin="1" overwrite="1" cellsDataFields="@generator.outputCellData"/>--> </Node>
I’m using sofa 16.08 and cgal 4.6 (I wasnt able to build the CGALPlugin with newer versions)
Any idea of what is going wrong?
23 January 2017 at 15:20 #8408HugoKeymasterHi Juan Jo,
I think something went wrong when copying-pasting your error.
You copied and pasted twice your XML scene.
Thanks for sending your error output,Hugo
1 February 2017 at 17:14 #8488jjcasmarBlockedYep, you are right. Anyway, I finally solved this error changing the component code. I dont have it here right now. I will improve this answer ASAP
14 February 2017 at 23:59 #8583HugoKeymasterHey Juan,
Can you tell us more about how you solved this error?
Cheers,Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.