[Gmsh] boolean operations on STL files

Christophe Geuzaine cgeuzaine at ulg.ac.be
Tue Oct 17 19:51:34 CEST 2017



> On 17 Oct 2017, at 16:41, Juan E. Sanchez <juan.e.sanchez at gmail.com> wrote:
> 
> Hello,
> 
> I am having issues reading in STL files and performing Boolean operations using Gmsh 3.0.5 for Mac OS X.
> 

That's clearly not supported: the boolean operations can only be performed on OpenCASCADE shapes, not triangulations.

Christophe

> SetFactory("OpenCASCADE");
> Merge "stlimport_part1.stl";
> Merge "stlimport_part2.STL";
> Merge "stlimport_part3.STL";
> Merge "stlimport_part4.STL";
> 
> //+
> Surface Loop(1) = {1};
> Surface Loop(2) = {2};
> Surface Loop(3) = {3};
> Surface Loop(4) = {4};
> 
> //+
> Volume(1) = {1};
> Volume(2) = {2};
> Volume(3) = {3};
> Volume(4) = {4};
> 
> 
> The OCC kernel fails to see the surfaces and volumes I have created from the files:
> 
> Error   : '/Users/foo/Desktop/foo.geo', line 8 : Could not add surface loop
> Error   : Unknown OpenCASCADE face with tag 2
> Error   : '/Users/foo/Desktop/foo.geo', line 9 : Could not add surface loop
> Error   : Unknown OpenCASCADE face with tag 3
> Error   : '/Users/foo/Desktop/foo.geo', line 10 : Could not add surface loop
> Error   : Unknown OpenCASCADE face with tag 4
> Error   : '/Users/foo/Desktop/foo.geo', line 11 : Could not add surface loop
> Error   : Unknown OpenCASCADE surface loop with tag 1
> Error   : '/Users/foo/Desktop/foo.geo', line 14 : Could not add volume
> Error   : Unknown OpenCASCADE surface loop with tag 2
> Error   : '/Users/foo/Desktop/foo.geo', line 15 : Could not add volume
> Error   : Unknown OpenCASCADE surface loop with tag 3
> Error   : '/Users/foo/Desktop/foo.geo', line 16 : Could not add volume
> Error   : Unknown OpenCASCADE surface loop with tag 4
> Error   : '/Users/foo/Desktop/foo.geo', line 17 : Could not add volume
> 
> What is the proper approach for using STL 2D surfaces with boolean operations?
> 
> Regards,
> 
> Juan
> 
> _______________________________________________
> 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




More information about the gmsh mailing list