[Gmsh] OpenCASCADE boolean operation with compound volume
Lionel Wilhelm
wilhelm at ycoorsystems.com
Tue Dec 12 13:50:03 CET 2017
Dear Gmsher's,
I have a problem making boolean operations on compound volumes. I
attached a small example that illustrate the problem. I have two boxes
sharing a face and a sphere intersecting both boxes. I would like to
substract the sphere from both boxes.
My idea was first to assemble/merge the boxes with the Compound Volume
command and then use the BooleanDifference operation.
At the step of the boolean operation, GMSH complain telling : "Error
: Unknown OpenCASCADE entity of dimension 3 with tag 28" but if I have a
look in Tools->Visibility the entity with tag 28 is the volume I want...
Does any of you have a hint ?
Kinldy,
Lionel Wilhelm
-------------- next part --------------
// Gmsh project created on Tue Dec 12 13:24:46 2017
SetFactory("OpenCASCADE");
// Create an empty list to store the individual boxes id.
boxes = {};
//create a new box
boxes += newv;
Box(boxes[0]) = {0,0,0,2,2,1};
//create another box
boxes += newv;
Box(boxes[1]) = {0,0,0,-2,2,3};
// create a sphere
sphere = newv;
Sphere(sphere) = {0,1,1,0.5};
// assemble the two boxes
twoboxes = newv;
Compound Volume(twoboxes) = {boxes[]};
// substract the sphere from the boxes
BooleanDifference{Volume{twoboxes};}{Volume{sphere}; Delete;}
More information about the gmsh
mailing list