Mesh multiple island regions

128 views
Skip to first unread message

naam...@gmail.com

unread,
Aug 8, 2013, 10:23:53 AM8/8/13
to iso2mes...@googlegroups.com
Hey,
I am trying to mesh a ball with multiple smaller balls in it.
The problem is that the program neglects some of the regions.
Is there a minimum size for an island? Is it the distance between them? Something else?
Thank you very much,
Naama

Qianqian Fang

unread,
Aug 12, 2013, 9:41:04 AM8/12/13
to iso2mes...@googlegroups.com, naam...@gmail.com
On 8/8/2013 10:23 AM, naam...@gmail.com wrote:
> Hey,
> I am trying to mesh a ball with multiple smaller balls in it.
> The problem is that the program neglects some of the regions.
> Is there a minimum size for an island? Is it the distance between
> them? Something else?

hi Naama

this is a known issue for CGAL. Please read the following FAQ:

http://iso2mesh.sourceforge.net/cgi-bin/index.cgi?Doc/FAQ#How_to_mesh_a_domain_containing_multiple_isolated_objects

and try the two work-arounds.

Qianqian

> Thank you very much,
> Naama
>
> --
> 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/groups/opt_out.
>
>



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.

naam...@gmail.com

unread,
Aug 16, 2013, 8:30:55 AM8/16/13
to iso2mes...@googlegroups.com, naam...@gmail.com
The purpose of procedures is to remove zero pixels. In my model, however, I do not have zero pixels....

Qianqian Fang

unread,
Aug 16, 2013, 10:32:31 AM8/16/13
to iso2mes...@googlegroups.com, naam...@gmail.com
On 8/16/2013 8:30 AM, naam...@gmail.com wrote:
The purpose of procedures is to remove zero pixels. In my model, however, I do not have zero pixels....

then I guess I did not fully understand your question. can you give more details?

נעמה שוהם

unread,
Aug 16, 2013, 1:16:46 PM8/16/13
to Qianqian Fang, iso2mes...@googlegroups.com
I would like to mesh a model that include one big ball in a box that has thin coating. In the big ball there are some small balls - pls. see the picture below.
The mesher ignores some of the small balls, even though they has different voxel values (which are not zero). What should I do...? 
תמונה מוטבעת 1


2013/8/16 Qianqian Fang <fa...@nmr.mgh.harvard.edu>
image.png

Qianqian Fang

unread,
Aug 16, 2013, 1:36:48 PM8/16/13
to iso2mes...@googlegroups.com, נעמה שוהם
On 08/16/2013 01:16 PM, נעמה שוהם wrote:
I would like to mesh a model that include one big ball in a box that has thin coating. In the big ball there are some small balls - pls. see the picture below.
The mesher ignores some of the small balls, even though they has different voxel values (which are not zero). What should I do...?

I think this is the perfect case to use surface->volumetric mesh route.
it looks like below:

[no_sph1,fc_sph1]=meshasphere(....);
[no_sph2,fc_sph2]=meshasphere(....);
[no_sph3,fc_sph3]=meshasphere(....);
...

[no,fc]=mergemesh(node_sph1,fc_sph1,node_sph2,fc_sph2,...);
centroids=[sx0,sy0,sz0;sx1,sy1,sz1;...]; % centroids of all spheres
[node,elem]=surf2mesh(no,fc,p0,p1,1,100,centroids,[],1);

plotmesh(node,elem,'y<z');


note 1: p0 and p1 in the surf2mesh call is the diagonal
coners of your bounding box.
note 2: all spheres shall not intersect each other, or the
bounding box.

נעמה שוהם

unread,
Aug 17, 2013, 1:59:26 AM8/17/13
to Qianqian Fang, iso2mes...@googlegroups.com
It possible that the spheres will be positioned in one big sphere that will be positioned in the bounding box? How can I do it?
Thanks!!

Qianqian Fang

unread,
Aug 17, 2013, 12:57:09 PM8/17/13
to iso2mes...@googlegroups.com, נעמה שוהם
On 8/17/2013 1:59 AM, נעמה שוהם wrote:
It possible that the spheres will be positioned in one big sphere that will be positioned in the bounding box? How can I do it?

I don't fully understand your question. can you explain it better?
(actually it sounds to me that it is easy for you to run it and find out)

Qianqian

נעמה שוהם

unread,
Aug 17, 2013, 1:11:35 PM8/17/13
to Qianqian Fang, iso2mes...@googlegroups.com
I added a slide that explain the model that I need to mesh. In the slide you can see 6 small spheres in one big sphere positioned in a bounding box. However, iso2mesh ignores some of the sphere during the mesh procedure. 
If I understood right, I can not use the surface->volumetric mesh route because I have one big sphere that include the small ones (and hence spheres intersect each other)....


2013/8/17 Qianqian Fang <fa...@nmr.mgh.harvard.edu>
iso2meshModel.pptx

נעמה שוהם

unread,
Aug 18, 2013, 5:13:57 AM8/18/13
to Qianqian Fang, iso2mes...@googlegroups.com
Another issue: can the sphere have the same centroid...?


2013/8/17 נעמה שוהם <naam...@gmail.com>

Qianqian Fang

unread,
Aug 19, 2013, 12:19:58 PM8/19/13
to iso2mes...@googlegroups.com, נעמה שוהם
On 08/17/2013 01:11 PM, נעמה שוהם wrote:
I added a slide that explain the model that I need to mesh. In the slide you can see 6 small spheres in one big sphere positioned in a bounding box. However, iso2mesh ignores some of the sphere during the mesh procedure. 
If I understood right, I can not use the surface->volumetric mesh route because I have one big sphere that include the small ones (and hence spheres intersect each other)....

in the latest version 1.4.x series, iso2mesh added several functions to
address surface intersections. If you plan to mesh the intersecting
spheres as a single combined region, you can do it with a combination of
surfboolean() and meshcheckrepair('meshfix'). Please run the following
example to understand the workflow:


% define 3 spheres
[no1,fc1]=meshasphere([0 0 0], 10, 0.5);
[no2,fc2]=meshasphere([8 0 8], 5, 0.5);
[no3,fc3]=meshasphere([-8 0 8], 5, 0.5);

% combine 3 spheres and clean the surface
[no,fc]=surfboolean(no1,fc1,'and',no2,fc2,'or',no3,fc3(:,[1 3 2]));
% Note: the funny 'and'/'or' operators here were due to the
% orientations of the surfaces
[no_f,fc_f]=meshcheckrepair(no,fc(:,1:3),'meshfix');
plotmesh(no_f,fc_f,'y>0')

% create volumetric mesh from the cleaned surface
[node,elem,face]=s2m(no_f,fc_f,1,1);
figure; plotmesh(node,elem,'y>0')


This works fine on linux, I know on windows the surfboolean
may fail due to a libgts bug.

if you want to mesh the intersecting regions as multiple
compartments, even though surfboolean can generate
these internal surfaces, unfortunately meshfix can not
process the output as it can only handle a single closed
surface at this point.


Re your question on the concentric spheres, yes, iso2mesh
can handle that without any trouble. You simply define
two interior points as "regions" in surf2mesh, one inside
the inner sphere, one in between the two shells, surf2mesh
should be able to label the two regions accordingly.

Qianqian




2013/8/17 Qianqian Fang <fa...@nmr.mgh.harvard.edu>


Thanks!!


2013/8/16 Qianqian Fang <fa...@nmr.mgh.harvard.edu>
Reply all
Reply to author
Forward
0 new messages