Multiple Volume Meshing of disjoint regions

17 views
Skip to first unread message

Kamran Ali Ahmed

unread,
Oct 21, 2024, 8:30:59 PM10/21/24
to iso2mesh-users

Dear Prof. Fang,

I am experiencing difficulties with the `v2m` function when attempting to mesh a solid volume that contains disconnected regions. Currently, the `v2m` function only recognizes and meshes the corner solid region, ignoring the main part of the topology. Although the corner region is an important component of the topology and needs to be included in the meshing process, it is equally crucial to incorporate the other disconnected section. I have attached a figure that illustrates this issue, highlighting that the meshing is only applied to the volume marked by an arrow. 

Despite my attempts to adjust the meshing parameters, specifically the opt.autoregion and opt.distbound, I have not achieved the desired outcome. Here are the settings I am currently using:


opt.radbound = 0.5;
opt.autoregion = 1;
opt.distbound = 0.5;
  
In my loop for processing multiple structures, I have the following code:  

for k = 1:structure_count
hollow_structure = all_structures(k).hollow_structure;
[node, element, face] = v2m(hollow_structure, 1, opt, 0.5, 'cgalsurf');
clear mode
element(element(:,5) ~= mode(element(:,5)), :) = [];
element(:, [1, 2, 3, 4]) = element(:, [1, 2, 4, 3]);
vol = elemvolume(node(:, 1:3), element(:, 1:4));
total_volume = sum(vol);
all_structures(k).total_volume = total_volume;
relative_density = total_volume / unitcellvol;
all_structures(k).relative_density = relative_density;
end

Please advise on potential strategies to enable the v2m function to effectively detect and mesh both solid volumes.


TPMS.jpg

Qianqian Fang

unread,
Oct 21, 2024, 8:43:35 PM10/21/24
to iso2mes...@googlegroups.com, Kamran Ali Ahmed

hi Kamran,

can you try using 'cgalmesh' instead of 'cgalsurf'?

also please read this thread:

https://github.com/fangq/iso2mesh/issues/7

especially a workaround described in FAQ#9

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


if what you described was indeed related to issue#7, the CGAL team had provided an improved cgalmesh code at the following pull-request

https://github.com/fangq/iso2mesh/pull/41


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/dc66f0ea-c69a-43ed-85d0-7aa53c11db2bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages