Face and edge intersection of copper fibers

83 views
Skip to first unread message

Yuanzhen Wang

unread,
Nov 16, 2020, 7:23:51 AM11/16/20
to iso2mesh-users
Hi,

Recently I use CT scan of copper fibers to generate .stl file for simulation. It is an extremely complex geometry. But when I imported it into Comsol, it says there exists intersecting edges and faces. Comsol support cannot to nothing about it so I download the iso2mesh to fix and refine my mesh. So I'm a really new beginner of iso2mesh

First I convert my .stl file to .off file using meshlab, then I use the function 'readoff' to import data to Matlab, I wondering what function should I use for this situation? In the attachment is the sceenshot of the geometry.

Qianqian Fang

unread,
Nov 16, 2020, 8:56:34 AM11/16/20
to iso2mes...@googlegroups.com, Yuanzhen Wang

you are better off to regenerate the mesh from iso2mesh instead. some of the iso2mesh pipelines are guaranteed to generate self-intersection-free surfaces, such as the default output of vol2surf (calling cgalsurf) or vol2mesh with cgalmesh option.

repairing a self-intersecting surface mesh is quite painful and there is currently no good tool for that purpose. the meshcheckrepair function calling 'meshfix' can repair a single closed surface, but fails when multiple surfaces intersect.

Qianqian



--
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 view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/22831c09-7cfd-4226-a204-0c39c609ac71n%40googlegroups.com.

Yuanzhen Wang

unread,
Nov 18, 2020, 3:58:53 AM11/18/20
to iso2mesh-users
Hi Fang,

I have tried vol2surf, however it delete almost all my geometry. it seems that large percentage of edges are intersected with themselves. Is there any function in iso2mesh that could detect the intersecting edges and somehow seperate them?

Regards,
Wang

Qianqian Fang

unread,
Nov 18, 2020, 9:38:40 AM11/18/20
to iso2mes...@googlegroups.com, Yuanzhen Wang
On 11/18/20 3:58 AM, Yuanzhen Wang wrote:
Hi Fang,

I have tried vol2surf, however it delete almost all my geometry. it seems that large percentage of edges are intersected with themselves. Is there any function in iso2mesh that could detect the intersecting edges and somehow seperate them?


not sure what you meant by "delete all your geometry". vol2surf takes an input of a 3D volume (binary or labels), and create a surface from the designated threshold value. please do help v2s or help vol2surf to see the input parameters. if you still can't figure out what happened, please send me your script and a small cropped volume for testing.



Regards,
Wang

在2020年11月16日星期一 UTC+1 下午2:56:34<q.fang> 写道:
On 11/16/20 2:46 AM, Yuanzhen Wang wrote:
Hi,

Recently I use CT scan of copper fibers to generate .stl file for simulation. It is an extremely complex geometry. But when I imported it into Comsol, it says there exists intersecting edges and faces. Comsol support cannot to nothing about it so I download the iso2mesh to fix and refine my mesh. So I'm a really new beginner of iso2mesh

First I convert my .stl file to .off file using meshlab, then I use the function 'readoff' to import data to Matlab, I wondering what function should I use for this situation? In the attachment is the sceenshot of the geometry.


you are better off to regenerate the mesh from iso2mesh instead. some of the iso2mesh pipelines are guaranteed to generate self-intersection-free surfaces, such as the default output of vol2surf (calling cgalsurf) or vol2mesh with cgalmesh option.

repairing a self-intersecting surface mesh is quite painful and there is currently no good tool for that purpose. the meshcheckrepair function calling 'meshfix' can repair a single closed surface, but fails when multiple surfaces intersect.

Qianqian



--
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 view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/22831c09-7cfd-4226-a204-0c39c609ac71n%40googlegroups.com.
--
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.

Yuanzhen Wang

unread,
Nov 18, 2020, 11:10:31 AM11/18/20
to iso2mesh-users
Hi,

Thanks for your quick response. like the screenshot i shown below, I don't know why my geometry are disappeared, I checked the v2s code and I still do not understand.

                                                  Before surface remeshing                                                                                                                                                      After

If you have some time and interested about this problem, please contact me via: wangyu...@hotmail.com
So I can send you my script and also geometry file. Thanks and have a nice day!

Regards,
Wang

Yuanzhen Wang

unread,
Nov 20, 2020, 5:07:50 AM11/20/20
to iso2mesh-users
I found the problem, when i called 'vol2restrictedtri.m' function, the function save my geometry in a temporary file: 'pre_extract.inr', However, this file is so big (10GB) that the 'cgalsur.exe' cannot deal with it, thus the 'post_extract.off' cannot be generated. Now I have no idea of how to deal with it...

Qianqian Fang

unread,
Nov 20, 2020, 1:56:32 PM11/20/20
to iso2mes...@googlegroups.com, Yuanzhen Wang
On 11/20/20 5:07 AM, Yuanzhen Wang wrote:
I found the problem, when i called 'vol2restrictedtri.m' function, the function save my geometry in a temporary file: 'pre_extract.inr', However, this file is so big (10GB) that the 'cgalsur.exe' cannot deal with it, thus the 'post_extract.off' cannot be generated. Now I have no idea of how to deal with it...


even that 10GB file could have been saved/loaded, the meshing will likely take forever or crash after exhausting all your memory.

the best practices is not to start with a very large volume before you know it works. My recommended strategy is to give iso2mesh a small volume cropped from the large volume, or a down-sampled version, also set the v2m/v2s mesh density parameters (opt/maxvol) to a large number to first produce a coarse mesh. then refine towards your desired density or full volume. at some point, when you see overly dense meshes or the meshing takes very long time, that's where you know you should stop.


Qianqian


Reply all
Reply to author
Forward
0 new messages