Thanks again, Jeremy. You seem to have nailed the origin of the problem. It still feels as a bug to me that reloading a script one just created, gives a different result. Or am I missing something on how GMSH works?
Stranger still: Action 1: Load the file below (without Coherence in the script). Click: 3D then Coherence then again 3D. This gives an error. Action 2: Load the file below (without Coherence in the script). Click: 3D then Coherence then 1D then again 3D. This gives the wanted results. This seems all unintuitive to me. Am I missing something of the GMSH logic? e.g. doesn’t clicking on the coherence command, execute that coherence command? Bart KanR = DefineNumber[ 0.1, Name "Parameters/KanR" ]; WanD = DefineNumber[ 0.2, Name "Parameters/WanD" ]; KanMeshsize = DefineNumber[ 0.01, Name "Parameters/KanMeshsize" ]; SetFactory("OpenCASCADE"); Rectangle(1) = {-2.5, -2.5, 0, 5, 5, 0}; Circle(5) = {0, 0, 0, KanR, 0, 2*Pi}; Curve Loop(2) = {5}; Plane Surface(2) = {2}; BooleanDifference{ Surface{1}; Delete; }{ Surface{2}; Delete; } Extrude {0, 0, WanD } { Surface{1}; } Point(15) = {0, KanR, 0}; Point(16) = {0, KanR-0.05, 0}; Point(17) = {0, KanR-0.05, WanD}; Point(18) = {0, KanR, WanD}; Line(20) = {15, 16}; Line(21) = {16, 17}; Line(22) = {17, 18}; Line(23) = {18, 15}; Curve Loop(24) = {20, 21, 22, 23}; Plane Surface(8) = {24}; Extrude {{0, 0, 1}, {0, 0, 0}, Pi} { Surface{8}; Layers {10}; } Field[1] = Distance; Field[1].EdgesList = {5}; Field[1].NNodesByEdge = 50; Field[2] = Threshold; Field[2].DistMax = 2.5; Field[2].DistMin = 0; Field[2].IField = 1; Field[2].LcMax = 0.25; Field[2].LcMin = KanMeshsize ; Background Field = 2; Mesh.CharacteristicLengthExtendFromBoundary = 0; Mesh.CharacteristicLengthFromPoints = 0; Mesh.CharacteristicLengthFromCurvature = 0;
_______________________________________________ gmsh mailing list gmsh@onelab.info http://onelab.info/mailman/listinfo/gmsh