Geometry.OCCAutoFix = 0;  //This should avoid the creation of duplicate surfaces due to orientation issues  
Geometry.CopyMeshingMethod = 0;    
Geometry.OrientedPhysicals = 0;    
Geometry.OCCFixDegenerated = 0;    
Geometry.OCCSewFaces = 0;          
Geometry.OCCBooleanPreserveNumbering = 1;    

SetFactory("OpenCASCADE");

Merge "test1.igs";
//Coherence; //seems to work if called here for this example (which I don't understand), but not for other ones

surfaces()=Surface "*";
Printf("Original Surfaces: ",surfaces());
lines()=Line "*";
Printf("Original Lines:", lines());
points()=Point "*";
Printf("Original Points:", points());      //so far, no duplicate entities seem to be from the igs file

Surface Loop(1) = { 1, 2, 3, 4, 5, 6 }; //duplicated surfaces which prevent from proper geometry building after this line are created

surfaces()=Surface "*";
Printf("Surfaces after Surface Loop: ",surfaces()); 
lines()=Line "*";
Printf("Lines after Surface Loop:", lines());

Volume(1) = { 1 };

boundary_surfaces() = Boundary{Volume{1};};
Printf("Actual Boundary Surfaces of created volume: ", boundary_surfaces());


Physical Volume(1) = { 1 };
Surface Loop(2) = { 6, 7, 8, 9, 10, 11 };
Volume(2) = { 2 };
Physical Volume(2) = { 2 };
Physical Surface(21) = { 11 };
Physical Surface(22) = { 1 };

//Mesh.CharacteristicLengthMax = 2.5;
//Mesh 3;
//OptimizeMesh "Gmsh";


