Keeping the external faces straight?

96 views
Skip to first unread message

iso2meshNewbie

unread,
May 2, 2018, 9:18:23 AM5/2/18
to iso2mesh-users
Hi all,

I am new to iso2mesh. I need to keep the external faces straight since I will be mirroring the meshed part later in ABAQUS.

But the resultant mesh has the faces non-straight, so there are gaps if I mirror the mesh in ABAQUS. Please see the screenshot below that shows the uneven exterior face profile.

I would appreciate any help in resolving this issue.



Qianqian Fang

unread,
May 2, 2018, 1:04:17 PM5/2/18
to iso2mes...@googlegroups.com, iso2meshNewbie
hi,

I do not see an attachment, perhaps you forgot to add?

if you need to keep the external surface straight, you will have to use the surface-based meshing pathway, and avoid using v2m with cgalmesh option.

an example of this approach can be found as sample/demo_directplc_ex1.m

https://github.com/fangq/iso2mesh/blob/master/sample/demo_directplc_ex1.m

another path is to use v2s to extract surfaces from a volumetric image, and then do a surfboolean with a bounding box mesh created using meshabox. This will cut a flat boundary from the non-flat surface. Then you can create a tetrahedral mesh. here is a quick example:

cd /path/to/iso2mesh/sample/
load rat_head.mat                       % load volumetric data
[no,fc]=v2s(volimage,0.5, 2);           % create surface of the volume
plotmesh(no,fc)
[nb,fb]=meshabox([0 0 2], [48 50 50], 5); % create a bounding box to slice the object
[nocut,fccut]=surfboolean(no,fc,'and',nb,fb); % use boolean to cut the boundary flat
[node,elem]=s2m(nocut,fccut,1,100);       % create tet mesh from the modified mesh
figure;
plotmesh(nocut,fccut)



Here I am attaching the plots before and after the cut, my bounding box is
designed so that the right face and bottom face are flat after the boolean.

you can see the change before and after the processing.

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 post to this group, send email to iso2mes...@googlegroups.com.
Visit this group at https://groups.google.com/group/iso2mesh-users.
For more options, visit https://groups.google.com/d/optout.


cut_boundary.png

iso2meshNewbie

unread,
May 11, 2018, 7:01:47 AM5/11/18
to iso2mesh-users
Dear Qianqian,

The previous file that you have not seen is attached here.

I appreciate your help, however I feel that I need to first learn the basics of iso2mesh. For example, how to load binarized tiff stack? Example script would be helpful.


Untitled (1).jpg

Moh

unread,
May 29, 2018, 7:59:40 AM5/29/18
to iso2mesh-users
Hi all

On this topic and a related question, when I try to use boolean to cut the boundiries, I encounter the error below.
Has anybody seen this before? Any help is much appreciated.

Best
Moh


>>[nocut,fccut]=surfboolean(no,fc,'and',nb,fb);
Error using surfboolean (line 188)
surface boolean command failed:
cd "/tmp/iso2mesh-user/" && "/home/user/iso2mesh/bin/cork.mexa64" -isct "/tmp/iso2mesh-user/pre_surfbool1.off"
"/tmp/iso2mesh-user/pre_surfbool2.off" "/tmp/iso2mesh-user/post_surfbool.off" -1648335518
ERROR: error at src/mesh/mesh.isct.tpp, line #1063: Ran out of tries to perturb the mesh

Qianqian Fang

unread,
May 30, 2018, 3:26:01 PM5/30/18
to iso2mes...@googlegroups.com, Moh
On 05/15/2018 01:40 AM, Moh wrote:
Hi all

On this topic and a related question, when I try to use boolean to cut the boundiries, I encounter the error below.
Has anybody seen this before? Any help is much appreciated.

I never saw this message. plot the two surfaces before the boolean to verify the locations are desired.

also, cork can not robustly handle co-planar surface (triangles along the same plane), so try to give an input bounding box that is slightly offset from the other surface being truncated.


Best
Moh


>>[nocut,fccut]=surfboolean(no,fc,'and',nb,fb);
Error using surfboolean (line 188)
surface boolean command failed:
cd "/tmp/iso2mesh-user/" && "/home/user/iso2mesh/bin/cork.mexa64" -isct "/tmp/iso2mesh-user/pre_surfbool1.off"
"/tmp/iso2mesh-user/pre_surfbool2.off" "/tmp/iso2mesh-user/post_surfbool.off" -1648335518
ERROR: error at src/mesh/mesh.isct.tpp, line #1063: Ran out of tries to perturb the mesh







On Friday, 11 May 2018 21:01:47 UTC+10, iso2meshNewbie wrote:
Dear Qianqian,

The previous file that you have not seen is attached here.

I appreciate your help, however I feel that I need to first learn the basics of iso2mesh. For example, how to load binarized tiff stack? Example script would be helpful.


Reply all
Reply to author
Forward
0 new messages