xyz point cloud to mesh

917 views
Skip to first unread message

michaeldotlink

unread,
Feb 9, 2015, 10:52:09 AM2/9/15
to iso2mes...@googlegroups.com
Hi everyone,
I´m currently working on my bachelor thesis "Workflow for construction of 3D volume models from 2D pattern".
Using two-point-correlation functions and "simulated annealing", I get the configuration of the 3d pixel coordinates of one phase stored in a .txt file (example attached).
So I can visualise the 3d model. What I have to do now is create surfaces and mesh the model to do a FE analysis (ABAQUS).

Is there a way using iso2mesh to get from the .txt point cloud of one of the two phases (or .xyz file) to a mesh that abaqus can read?

Thank you in advance and greetings from Germany,

Michael




3D_27100pixel.txt

Qianqian Fang

unread,
Feb 10, 2015, 7:07:48 PM2/10/15
to iso2mes...@googlegroups.com
On 02/09/2015 10:52 AM, michaeldotlink wrote:
Hi everyone,
I´m currently working on my bachelor thesis "Workflow for construction of 3D volume models from 2D pattern".
Using two-point-correlation functions and "simulated annealing", I get the configuration of the 3d pixel coordinates of one phase stored in a .txt file (example attached).
So I can visualise the 3d model. What I have to do now is create surfaces and mesh the model to do a FE analysis (ABAQUS).

Is there a way using iso2mesh to get from the .txt point cloud of one of the two phases (or .xyz file) to a mesh that abaqus can read?

hi Michael

we do not have any function to handle point clouds yet, but it is
on the v3.0's roadmap.

please checkout this reply I made previously.

https://groups.google.com/forum/#!msg/iso2mesh-users/4QxsKaszW5A/OALcHNeDrR4J

there are open-source tools that convert a point cloud to a surface. For example,
the mentioned PoissonRecon program. However, it requires not only the x/y/z
coordinates, but also the norm at each node.

do you think you can calculate the norms? if so, give PoissonRecon a try.

Alternatively, the CGAL and Point Cloud libraries (PCL) have more
sophisticated functions, but they are not matlab based, and require
more efforts in understanding and using.

Qianqian


Thank you in advance and greetings from Germany,

Michael




--
You received this message because you are subscribed to the Google Groups "iso2mesh-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iso2mesh-user...@googlegroups.com.
To post to this group, send email to iso2mes...@googlegroups.com.
Visit this group at http://groups.google.com/group/iso2mesh-users.
For more options, visit https://groups.google.com/d/optout.

The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

michaeldotlink

unread,
Apr 10, 2015, 11:34:43 AM4/10/15
to iso2mes...@googlegroups.com
Hello Qianqian, hello iso2mesh users,

I´ve managed to get a .STL via "Covise" (see attached visualization of a test structure innerStructureSTL.png. You can see the pores surrounded by material).
I even got a cubic box around the structure. But everything is hollow and only surface meshed (see attached innerPlusCube.png).
So for the last step, the FE analysis, I tried to use the attached iso2mesh Matlab script on the converted structure as .inp (abaqus), see kleintest.txt.

Although a whole CPU core seemed to work all the time, their was still no result after eight hours, so I canceled the job.
Am I doing something wrong? Does anyone know a solution to my problem - doing a tensile test of the porous structure in Abaqus (or another FE program).

Michael
innerStructureSTL.PNG
innerPlusCube.PNG
Mikrorekon_surf_solid.m
kleintest.txt

Qianqian Fang

unread,
Apr 10, 2015, 12:45:38 PM4/10/15
to iso2mes...@googlegroups.com
On 04/10/2015 11:34 AM, michaeldotlink wrote:
Hello Qianqian, hello iso2mesh users,

I´ve managed to get a .STL via "Covise" (see attached visualization of a test structure innerStructureSTL.png. You can see the pores surrounded by material).
I even got a cubic box around the structure. But everything is hollow and only surface meshed (see attached innerPlusCube.png).
So for the last step, the FE analysis, I tried to use the attached iso2mesh Matlab script on the converted structure as .inp (abaqus), see kleintest.txt.

Although a whole CPU core seemed to work all the time, their was still no result after eight hours, so I canceled the job.
Am I doing something wrong? Does anyone know a solution to my problem - doing a tensile test of the porous structure in Abaqus (or another FE program).

hi Michael

I tried your script, but it appears that dlmread failed
to read the v/f from your surface mesh file, which does
not look like an STL file.

I manually extracted the node and surface lists and imported
into matlab. I plotted the surface, it looks quite normal,
no self-intersecting elements because the bounding box encloses
all the inclusions.

I then run the following script:

v=load('knode.txt');
f=load('kface.txt');
f=f(:,2:4);
seeds=surfseeds(v,f);
[node,elem,face]=surf2mesh(v,f,p0,p1,keepratio,maxvol,seeds);

plotmesh(node,elem(elem(:,end)~=6,:))
hold on
plotmesh(node,elem(elem(:,end)==6,:),'z<5')

I got the attached mesh screenshot. the surf2mesh call only took 1 second.

If you want to remove the inclusions and leave them as holes, then
you can use

[no,el]=removeisolatednode(node,elem(elem(:,end)==6,1:4));

let me know if you can reproduce this.

Qianqian
mesh_kleintest.png

Qianqian Fang

unread,
Apr 10, 2015, 1:05:15 PM4/10/15
to iso2mes...@googlegroups.com
On 04/10/2015 11:34 AM, michaeldotlink wrote:
Hello Qianqian, hello iso2mesh users,

I´ve managed to get a .STL via "Covise" (see attached visualization of a test structure innerStructureSTL.png. You can see the pores surrounded by material).
I even got a cubic box around the structure. But everything is hollow and only surface meshed (see attached innerPlusCube.png).
So for the last step, the FE analysis, I tried to use the attached iso2mesh Matlab script on the converted structure as .inp (abaqus), see kleintest.txt.

Although a whole CPU core seemed to work all the time, their was still no result after eight hours, so I canceled the job.
Am I doing something wrong? Does anyone know a solution to my problem - doing a tensile test of the porous structure in Abaqus (or another FE program).

also, a side note, you don't have to provide a bounding box surface
in your input. surf2mesh has an option, forcebox, to add a bounding box.

try the following script and see how it works:

%% let me first remove your bounding box surface
% separate the input mesh into isolated components
fc=finddisconnsurf(f);

% remove the maximum component (bbx) from the surface
objonly=setdiff(f,maxsurf(fc),'rows');

% remove the nodes on the bbx
[objv,objfc]=removeisolatednode(v,objonly);

%% now assuming objv and objfc is your input
% run surf2mesh by using the built-in bounding box surface

seeds=surfseeds(objv,objfc);
[node,elem,face]=surf2mesh(objv,objfc,p0,p1,keepratio,maxvol,seeds,[],1);

% plot the results
figure;hold on
plotmesh(node,elem(elem(:,end)>0,:))
plotmesh(node,elem(elem(:,end)==0,:),'z<5')
hc=plotmesh(node,elem(elem(:,end)==0,:),'z>5','facealpha',0.2,'edgealpha',0.2);

see the attached mesh plots. the mesh should have less nodes
(but equally well in quality) than the previous one.

Qianqian
mesh_kleintest_bbx.png

michaeldotlink

unread,
Apr 10, 2015, 1:35:00 PM4/10/15
to iso2mes...@googlegroups.com
Thank you! I think it worked. There are no self-intersecting elements because I made the bouning box bigger by purpose so the inclusiones are "closed" (else it looks like in "offen.png")
First I extracted the needed information (kface.txt and knode.txt last three columns) and added your script pieces.
The result (mesh.png) looks nice! Sadly I´m at home and not at the university so I cant check it out in abaqus.
Do you think it worked and the inclusions are hollow? So I got the material (grey) with pores meshed and ready to do a numeric tensile test?!

Looking forward to further testing and using this. Thanks again for your quick help.

Michael
kface.txt
knode.txt
MESH.m
mesh.png
offen.PNG

Qianqian Fang

unread,
Apr 11, 2015, 8:14:18 AM4/11/15
to iso2mes...@googlegroups.com
On 04/10/2015 01:35 PM, michaeldotlink wrote:
Do you think it worked and the inclusions are hollow? So I got the material (grey) with pores meshed and ready to do a numeric tensile test?!

the plotted meshes include the inclusions, but marked them with
different labels (colors). you can make them hollow by removing them
with this command (for your input mesh)

[no,el]=removeisolatednode(node,elem(elem(:,end)==6,1:4));

if you use the bbx added by surf2mesh, change 6 to 0 in the above line.

Qianqian
Reply all
Reply to author
Forward
0 new messages