--
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/b0cb8b3f-2c35-42b2-afdc-6d852975ec93n%40googlegroups.com.
you can call surfboolean(.., 'resolve', ...) to intersect two arbitrarily complex surfaces - each may contain multiple closed compartments (such as latticegrid), and then call s2m(..., 'tetgen1.5', ...) to mesh the output and uniquely label each enclosed region.
please see the below script as an example. the output screenshots
are attached.
% create shape 1
n1=[50,50,-10; 80,20,100; 30,20, 100; 50, 70, 100];
e1=[1,2,3,4]
% create multi-layer structure and extract the
surface
[node,face,c0]=latticegrid([0 100],[0 100],[0 30 50
80]);
[n2,e2,f2]=surf2mesh(node,face,[],[],1,10,c0);
[n3,f3]=removeisolatednode(n2,f2(:,1:3));
f1=volface(e1);
% resolve the two surfaces
[nn, ff]=surfboolean(n1,f1,'resolve',n3,f3);
% volumetric meshing
[node, elem]=s2m(nn, ff, 1, 10, 'tetgen1.5');
% alternatively, you can manually seed each region
using the below call
% [node, elem]=s2m(nn, ff, 1, 100, 'tetgen', [c0;
[c0(:,1)-30, c0(:,2:3)]]);
figure;
plotmesh(nn,ff, 'y>20')
figure;
plotmesh(node, elem, 'y>50')
in addition, you can do this fairly easily using a combination of
Blender and our recently released BlenderPhotonics addon
(https://github.com/NeuroJSON/BlenderPhotonics). BlenderPhotonics
is basically a front-end for Iso2mesh and MC photon simulator. See
our paper for details
https://doi.org/10.1117/1.JBO.27.8.083014
hope this helps
Dear Dr. Fang
Thanks for your kind attention.
The geometric model of my previous work was a four-layer cube and a cylinder inside it, which is shown in picture 1.
Now I plan to place an asymmetric shape instead of a cylinder, which has an asymmetric cross section instead of a circular section, and its section radius decreases in the direction of the z axis, like something similar to figure 2 in the attachment.
My problem is designing this shape to be compatible with ISO2mesh toolbox.
--On Friday, February 10, 2023 at 2:11:42 AM UTC+3:30 q.fang wrote:
it is not entirely clear to me what shape you are trying to mesh. do you have a drawing or plot to show what you want to achieve? and which step were you having trouble?
On 2/9/23 09:32, mari sadat wrote:
Hello Dr.FangI want to mesh a 4 layer cube with asymmetric 3D shape in it. This three-dimensional shape can have a star-like cross-section in the first layer of the cube, which decreases its radius as the thickness increases in the lower layers of the cube.I did it with cylinder successfully and got my results but for this asymmetric shape I do not find appropriate function.Would you guide me if you have any ideas, please?--
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/b0cb8b3f-2c35-42b2-afdc-6d852975ec93n%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.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/6f05d742-5fd8-42d7-9173-6cfc21376ee0n%40googlegroups.com.
if you change the z-coordinate of the lowest node in your n1 list
to a small positive number instead of 0, for example
n1=[1,1,1e-4; 1.2,1.1,.81; 1.6,.5,.81; .5, 1.2, .81];
your code will run.
the previous issue is that your n1(1,:) node is exactly co-planar to your lattice grid's bottom face. Processing co-planar geometries is an extremely difficult problem that there is almost no existing tool/library can handle it robustly, including the cork utility called by surfboolean in iso2mesh.
because of this, you should never create co-planar shapes before
boolean/merge.
To view this discussion on the web visit https://groups.google.com/d/msgid/iso2mesh-users/a3947122-708f-45ac-a8d3-ffe474035fb4n%40googlegroups.com.