[Gmsh] half of structure disappears
Juan E. Sanchez
juan.e.sanchez at gmail.com
Sat Mar 3 20:40:10 CET 2018
Hello,
I am using the OpenCASCADE factory to create a fairly complicated
structure. In this simplified test case, I run into the issue where
part of the structure disappears when the center of it is removed.
When GMSH opens the file, it looks correct. Then when I start
manipulating it in the Visibility dialog, half of the "air" volume
disappears.
When 3d meshing half of the "air" volume is also missing.
When I reopen the saved mesh, half the "air" volume is also missing.
Could someone please take a look?
Regards,
Juan Sanchez
-------------- next part --------------
// Gmsh project created on Fri Oct 6 14:11:46 2017
SetFactory("OpenCASCADE");
//+
Point(1) = {0, -0.5, 0, 1.0};
//+
Point(2) = {0, 0.5, 0, 1.0};
//+
Point(3) = {0, 0.5, 1, 1.0};
//+
Point(4) = {0, -0.5, 1, 1.0};
Line(5) = {1, 2};
Line(6) = {2, 3};
Line(7) = {3, 4};
Line(8) = {4, 1};
//+
Line Loop(1) = {6, 7, 8, 5};
//+
Plane Surface(1) = {1};
//+
out() = Extrude {01, 0, 0} {
Surface{1};
};
// out[1] is the volume, out[0] is the top
unit_box=out[1];
l_box=100;
x_box = -0.5*l_box;
w_box=10;
h_box =10;
l_gate = 50;
w_gate = w_box;
x_gate = -0.5*l_gate;
h_gate = h_box;
gate = Dilate {{0, 0, 0}, {l_gate, w_gate, h_gate}} {
Duplicata { Volume{unit_box}; }
};
gate=Translate{x_gate,0,0}{Volume{gate};};
air = Dilate {{0, 0, 0}, {l_box, w_box, h_box}} {
Duplicata { Volume{unit_box}; }
};
air=Translate{x_box,0,0}{Volume{air};};
air=BooleanDifference{Volume{air}; Delete;}{ Volume{gate};};
Recursive Delete{Volume{unit_box};}
BooleanFragments{ Volume{air}; Volume{gate}; Delete;}{}
Physical Volume ("gate") = {gate};
Physical Volume ("air") = {air};
More information about the gmsh
mailing list