[Gmsh] Boolean operations with stl files (OpenCASCADE - Gmsh )
Octavio Castillo Reyes
ocastilloreyes at gmail.com
Mon Feb 4 17:47:53 CET 2019
Dear gmsh team,
I am trying to create meshes with topography (including bathymetry and
other complex embedding bodies). I have made several experiments:
* Boolean operations with meshes (not supported by gmsh)
* Create flat surfaces and then interpolate them to a given topography
(works well but is only valid for a physical material/group).
The above led me to try the OpenCASCADE kernel. I am learning to use it and
I have modified one of its examples:
SetFactory("OpenCASCADE");
Mesh.CharacteristicLengthMin = 0.5;
Mesh.CharacteristicLengthMax = 0.2;
Box(1) = {0, -1, -1, 2, 2, 2};
Sphere(2) = {0, 0, 0, 1.};
BooleanDifference(3) = { Volume{1}; Delete; }{ Volume{2}; Delete;
};
However, my input topography is given as a STL file. Therefore,I would like
to know if it is possible to carry out operations such as the following:
* SetFactory("OpenCASCADE");*
* Merge "Box.stl" ; // Volume 1*
* Merge "Sphere.stl"; // Volume 2*
* Mesh.CharacteristicLengthMin = 0.5;
Mesh.CharacteristicLengthMax = 0.2; BooleanDifference(3) = {
Volume{1}; Delete; }{ Volume{2}; Delete; };*
Or something like:
* SetFactory("OpenCASCADE");*
* Merge "Volume_Topo.stl" ; // Volume 1*
* Merge "Volume_No_Topo.stl"; // Volume 2*
* Mesh.CharacteristicLengthMin = 0.5;
Mesh.CharacteristicLengthMax = 0.2; BooleanDifference(3) = {
Volume{1}; Delete; }{ Volume{2}; Delete; }; *
Is it possible to import STL files and perform boolean operations? How to
define a volume from Boolean operations between two STL files (previously
created)? Actually, the gmsh error is the following:
*Unknown OpenCASCADE entity of dimension 3 with tag 1*
*.... Could not apply boolean operator*
I am very interested in knowing about the best strategy to perform this
task. Unfortunately, until now it has not been clear to me how to solve my
problem.
Thank you for your time and support
Best regards!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20190204/731b3ac3/attachment.html>
More information about the gmsh
mailing list