sphere model

44 views
Skip to first unread message

shorty2243

unread,
Mar 14, 2018, 5:59:06 PM3/14/18
to iso2mesh-users
Hello,

I'm trying to build a spherical mesh with concentric layers...I am creating different spheres using the meshasphere function and using mergemesh to bring them together, the result looks like this:


The issue is that the spheres are merging in the centre whereas I need defined regions, more like shells.

Do you know how to do this ?

Thanks!

Qianqian Fang

unread,
Mar 14, 2018, 6:11:16 PM3/14/18
to iso2mes...@googlegroups.com, shorty2243
On 03/14/2018 05:59 PM, shorty2243 wrote:
Hello,

I'm trying to build a spherical mesh with concentric layers...I am creating different spheres using the meshasphere function and using mergemesh to bring them together, the result looks like this:

hi

mergemesh() does not work when merging meshes that are overlapping (or
intersecting).

in fact, it only "concatenates" surface or tetrahedral meshes, and does not check
overlapping or intersections.

If you want to merge surfaces with intersection testing, you need to use mergesurf()
or surfboolean(..,'resolve',...).

for the mesh you wanted to create, it should work like this:

[no1,fc1]=meshasphere();
[no2,fc2]=meshasphere();
[no,fc]=mergemesh(no1,fc1,no2,fc2);
regions=[3D_point_in_sphere1; 3D_point_in_sphere2];
[node,elem]=s2m(no,fc,...,regions);

you can not create tet mesh of the two spheres and merge them directly.

Qianqian



The issue is that the spheres are merging in the centre whereas I need defined regions, more like shells.

Do you know how to do this ?

Thanks!
--
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.


shorty2243

unread,
Mar 14, 2018, 6:46:41 PM3/14/18
to iso2mesh-users
Thankyou!

After running your suggestion I get :


This is close to what I need however rather than thin shells i need volumes such that there are not gaps between the layers, more like this:



Thankyou for the help!

T

Qianqian Fang

unread,
Mar 14, 2018, 6:49:15 PM3/14/18
to iso2mes...@googlegroups.com, shorty2243
On 03/14/2018 06:46 PM, shorty2243 wrote:
Thankyou!

After running your suggestion I get :


perhaps you set the parameter holes rather than regions in your s2m call? see

https://github.com/fangq/iso2mesh/blob/master/s2m.m#L4

Qianqian
Reply all
Reply to author
Forward
0 new messages