[Gmsh] Boolean Fragments. Créate 3d mesh from surfaces. Surface Loop creates aditional surfaces

Jacob Abdelfatah Ndioubnane jacoban90 at outlook.es
Wed Feb 7 19:26:35 CET 2018


Thank you for your answer. I tried your boolean fragments command and gets me in that line the following error:

Info    : Reading 'C:\Users\Jacob\Documents\Cube\Cube.geo'...
Info    : Reading 'C:\Users\Jacob\Documents\Cube\Inlet.brep'...
Info    : Done reading 'C:\Users\Jacob\Documents\Cube\Inlet.brep'
Info    : Reading 'C:\Users\Jacob\Documents\Cube\Walls.brep'...
Info    : Done reading 'C:\Users\Jacob\Documents\Cube\Walls.brep'
Info    : Reading 'C:\Users\Jacob\Documents\Cube\Outlet.brep'...
Info    : Done reading 'C:\Users\Jacob\Documents\Cube\Outlet.brep'
Error   : 'C:\Users\Jacob\Documents\Cube\Cube.geo', line 7 : syntax error (:)
Error   : 'C:\Users\Jacob\Documents\Cube\Cube.geo', line 7 : syntax error (;)
Error   : 'C:\Users\Jacob\Documents\Cube\Cube.geo', line 7 : syntax error (})
Info    : Done reading 'C:\Users\Jacob\Documents\Cube\Cube.geo'
Info    : Writing 'C:\Users\Jacob\Documents\Cube\cube.log'...

Instead of that I proved to use BooleanFragments{ Surface{1:6}; Delete; }{ }, but when apply the Surface loop appears 6 more surfaces and the volumen is referenced to them.

[cid:image002.png at 01D3A041.2D4A5180]

I also tried to use Geometry.OCCAutoFix = 0, and gets me the output:

Info    : Reading 'C:\Users\Jacob\Documents\Cube\Cube.geo'...
Error   : Unknown number option 'Geometry.OCCAutoFix'
Info    : Reading 'C:\Users\Jacob\Documents\Cube\Inlet.brep'...
Info    : Done reading 'C:\Users\Jacob\Documents\Cube\Inlet.brep'
Info    : Reading 'C:\Users\Jacob\Documents\Cube\Walls.brep'...
Info    : Done reading 'C:\Users\Jacob\Documents\Cube\Walls.brep'
Info    : Reading 'C:\Users\Jacob\Documents\Cube\Outlet.brep'...
Info    : Done reading 'C:\Users\Jacob\Documents\Cube\Outlet.brep'
Info    : Done reading 'C:\Users\Jacob\Documents\Cube\Cube.geo'
Info    : Writing 'C:\Users\Jacob\Documents\Cube\Cube2.log'...

I attach the script what I used to do that.

Best Regards
Jacob

Enviado desde Correo<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows 10

De: Christophe Geuzaine<mailto:cgeuzaine at uliege.be>
Enviado: miércoles, 7 de febrero de 2018 17:21
Para: Jacob Abdelfatah Ndioubnane<mailto:jacoban90 at outlook.es>
CC: Christophe Geuzaine<mailto:cgeuzaine at ulg.ac.be>; gmsh at onelab.info<mailto:gmsh at onelab.info>; G. D. McBain<mailto:gdmcbain at protonmail.com>
Asunto: Re: [Gmsh] Boolean Fragments. Créate 3d mesh from surfaces. Surface Loop creates aditional surfaces




On 7 Feb 2018, at 09:07, Jacob Abdelfatah Ndioubnane <jacoban90 at outlook.es<mailto:jacoban90 at outlook.es>> wrote:

Is thiis would be related to the normals of the surfaces?. I noticed that the normals is oriented outward. So i tried to invert the normals but i cannt find a way to do this.


This works fine here:

SetFactory("OpenCASCADE");
Merge "Inlet.brep";
Merge "Walls.brep";
Merge "Outlet.brep";
BooleanFragments{ Surface{:}; Delete; }{ }
Surface Loop(1) = {1, 5, 2, 3, 6, 4};
Volume(1) = {1};


When the orientation of surfaces is inconsistent open cascade will by default automatically reorient the surfaces; unless you set Geomtry.OCCAutoFix = 0.



I attach a figure below.

Best Regards
Jacob<02951EDB824840E597D871724BDD93AD.png>

Enviado desde Correo<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows 10

De: Jacob Abdelfatah Ndioubnane<mailto:jacoban90 at outlook.es>
Enviado: martes, 6 de febrero de 2018 22:36
Para: Christophe Geuzaine<mailto:cgeuzaine at ulg.ac.be>; gmsh at onelab.info<mailto:gmsh at onelab.info>; gmsh-owner at onelab.info<mailto:gmsh-owner at onelab.info>; gmsh-request at ace20.montefiore.ulg.ac.be<mailto:gmsh-request at ace20.montefiore.ulg.ac.be>; G. D. McBain<mailto:gdmcbain at protonmail.com>
Asunto: Boolean Fragments. Créate 3d mesh from surfaces. Surface Loop creates aditional surfaces

Hi gmsh users:

I’m trying to créate a 3d mesh of a cube from a merged 3d surfaces to apply physical groups easily. I applied the booleanFragments operator, and it removes the aditional edges and vértices. However, when I créate a Surface loop, automatically generates aditional surfaces(when i go to tools;vissibility;tree appears 12 surfaces) it creates a , and the volume is referenced to the dupplicate surfaces. Im able to créate both 2d and 3d meses, but when i export into freefem as .mesh or .msh is not loaded correctly. Is there any way to solve this problem.  I attach the .geo script below and also the .brep surfaces and the generated .mesh and .msh meses.

// Gmsh project created on Tue Feb 06 20:13:28 2018
SetFactory("OpenCASCADE");

Merge "Inlet.brep";
Merge "Walls.brep";
Merge "Outlet.brep";

s() = Surface "*";
BooleanFragments{ Surface{s(0)}; Delete; }{ Surface{s({0:#s()-1})}; Delete; }//+




//+
Surface Loop(1) = {1, 5, 2, 3, 6, 4};

Volume(1) = {1};

Thank you very much in advance.

Best Regards
Jacob

Enviado desde Correo<https://go.microsoft.com/fwlink/?LinkId=550986> para Windows 10


_______________________________________________
gmsh mailing list
gmsh at onelab.info<mailto: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/20180207/4c0f8ae4/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 77EC94B488A34710A037994804FB02A5.png
Type: image/png
Size: 114166 bytes
Desc: 77EC94B488A34710A037994804FB02A5.png
URL: <http://onelab.info/pipermail/gmsh/attachments/20180207/4c0f8ae4/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Dupplicate surfaces.PNG
Type: image/png
Size: 45449 bytes
Desc: Dupplicate surfaces.PNG
URL: <http://onelab.info/pipermail/gmsh/attachments/20180207/4c0f8ae4/attachment-0001.PNG>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Cube.geo
Type: application/octet-stream
Size: 262 bytes
Desc: Cube.geo
URL: <http://onelab.info/pipermail/gmsh/attachments/20180207/4c0f8ae4/attachment-0001.geo>


More information about the gmsh mailing list