[Gmsh] boolean partitioning

Christophe Geuzaine cgeuzaine at ulg.ac.be
Mon May 22 20:52:02 CEST 2017


Here's an example, for Gmsh 3.0.2:

SetFactory("OpenCASCADE");

Box(1) = {-0, 0, 0, 1, 1, 1};

p() = PointsOf{ Volume{1}; };
Characteristic Length{p()} = 0.2;

Rectangle(7) = {0.4, 0.7, 0.2, 0.3, 0.3, 0};
Rectangle(8) = {-0.2, 0.3, 0.5, 0.3, 0.3, 0};
Rectangle(9) = {0.8, -0.2, 0.5, 0.3, 0.3, 0};
Rectangle(10) = {0.3, 0.3, 0.5, 0.3, 0.3, 0};

b() = BooleanFragments{ Volume{1}; Delete; }{ Surface{7:10}; Delete; };

p() = PointsOf{ Surface{b({1:6})}; };
Characteristic Length{p()} = 0.04;






> On 4 May 2017, at 12:30, Jeremy Theler <jeremy at seamplex.com> wrote:
> 
> 
>> I have found an another way to import a brep file. However I can't
>> understand how the characteristic sizes are applied. I want to apply a
>> more dense mesh around the internal surfaces without the cost of a
>> field command. 
> 
> I don't either.
> 
> But what I do is I set the characteristic length of all points to a
> basic lc
> 
> p[] = Point "*";
> Characteristic Length { p[] } = lc;
> 
> and then set a lower value for some of the points I want to refine
> around. You have to known the id of such points, though.
> 
> Is there any better solution without falling back to a background field?
> 
> --
> jeremy
> www.seamplex.com
> 
> 
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

-- 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://www.montefiore.ulg.ac.be/~geuzaine

Free software: http://gmsh.info | http://getdp.info | http://onelab.info

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20170522/4344c772/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: baffles.png
Type: image/png
Size: 528464 bytes
Desc: not available
URL: <http://onelab.info/pipermail/gmsh/attachments/20170522/4344c772/attachment-0001.png>


More information about the gmsh mailing list