SetFactory("OpenCASCADE");

Mesh.CharacteristicLengthMin = 2; 
Mesh.CharacteristicLengthMax = 12;

// ---------- Voxel ---------- 
dim = 500.0000; corner = 0.0000; v = newv; 
Box(v) = {corner,corner,corner,dim,dim,dim}; 
svox() = Boundary{Volume{v};}; 
//Physical Surface(0) = {svox()}; 

// -------- Vessel # 1 -------- 
ox1 = 190.1537; oy1 = 40.0000; oz1 = 327.4934; 
vx1 = 0.0000; vy1 = 420.0000; vz1 = 0.0000; r1 = 10.0000; 
c1 = newv; Cylinder(c1) = {ox1,oy1,oz1,vx1,vy1,vz1,r1}; 
// ------ Vessel # 2 ------ 
ox2 = 410.8614; oy2 = 75.5063; oz2 = 40.0000; 
vx2 = 0.0000; vy2 = 0.0000; vz2 = 420.0000; r2 = 10.0000; 
c2 = newv; Cylinder(c2) = {ox2,oy2,oz2,vx2,vy2,vz2,r2}; 
union2() = BooleanUnion{ Volume{c1}; Delete;}{ Volume{c2}; Delete;};
// ------ Vessel # 3 ------ 
ox3 = 214.4132; oy3 = 40.0000; oz3 = 379.9616; 
vx3 = 0.0000; vy3 = 420.0000; vz3 = 0.0000; r3 = 10.0000; 
c3 = newv; Cylinder(c3) = {ox3,oy3,oz3,vx3,vy3,vz3,r3}; 
union3() = BooleanUnion{ Volume{union2()}; Delete;}{ Volume{c3}; Delete;};
// ------ Vessel # 4 ------ 
ox4 = 74.7522; oy4 = 40.0000; oz4 = 382.1399; 
vx4 = 0.0000; vy4 = 420.0000; vz4 = 0.0000; r4 = 10.0000; 
c4 = newv; Cylinder(c4) = {ox4,oy4,oz4,vx4,vy4,vz4,r4}; 
union4() = BooleanUnion{ Volume{union3()}; Delete;}{ Volume{c4}; Delete;};
// ------ Vessel # 5 ------ 
ox5 = 131.1588; oy5 = 100.4634; oz5 = 40.0000; 
vx5 = 0.0000; vy5 = 0.0000; vz5 = 420.0000; r5 = 10.0000; 
c5 = newv; Cylinder(c5) = {ox5,oy5,oz5,vx5,vy5,vz5,r5}; 
union5() = BooleanUnion{ Volume{union4()}; Delete;}{ Volume{c5}; Delete;};
// ------ Vessel # 6 ------ 
ox6 = 337.5948; oy6 = 40.0000; oz6 = 376.9161; 
vx6 = 0.0000; vy6 = 420.0000; vz6 = 0.0000; r6 = 10.0000; 
c6 = newv; Cylinder(c6) = {ox6,oy6,oz6,vx6,vy6,vz6,r6}; 
union6() = BooleanUnion{ Volume{union5()}; Delete;}{ Volume{c6}; Delete;};
// ------ Vessel # 7 ------ 
ox7 = 221.5138; oy7 = 214.9334; oz7 = 40.0000; 
vx7 = 0.0000; vy7 = 0.0000; vz7 = 420.0000; r7 = 10.0000; 
c7 = newv; Cylinder(c7) = {ox7,oy7,oz7,vx7,vy7,vz7,r7}; 
union7() = BooleanUnion{ Volume{union6()}; Delete;}{ Volume{c7}; Delete;};
// ------ Vessel # 8 ------ 
ox8 = 40.0000; oy8 = 327.9280; oz8 = 151.2125; 
vx8 = 420.0000; vy8 = 0.0000; vz8 = 0.0000; r8 = 10.0000; 
c8 = newv; Cylinder(c8) = {ox8,oy8,oz8,vx8,vy8,vz8,r8}; 
union8() = BooleanUnion{ Volume{union7()}; Delete;}{ Volume{c8}; Delete;};
// ------ Vessel # 9 ------ 
ox9 = 40.0000; oy9 = 434.3791; oz9 = 204.2036; 
vx9 = 420.0000; vy9 = 0.0000; vz9 = 0.0000; r9 = 10.0000; 
c9 = newv; Cylinder(c9) = {ox9,oy9,oz9,vx9,vy9,vz9,r9}; 
union9() = BooleanUnion{ Volume{union8()}; Delete;}{ Volume{c9}; Delete;};
// ------ Vessel # 10 ------ 
ox10 = 362.2467; oy10 = 419.4478; oz10 = 40.0000; 
vx10 = 0.0000; vy10 = 0.0000; vz10 = 420.0000; r10 = 10.0000; 
c10 = newv; Cylinder(c10) = {ox10,oy10,oz10,vx10,vy10,vz10,r10}; 
union10() = BooleanUnion{ Volume{union9()}; Delete;}{ Volume{c10}; Delete;};
// ------ Vessel # 11 ------ 
ox11 = 254.4324; oy11 = 40.0000; oz11 = 42.9293; 
vx11 = 0.0000; vy11 = 420.0000; vz11 = 0.0000; r11 = 10.0000; 
c11 = newv; Cylinder(c11) = {ox11,oy11,oz11,vx11,vy11,vz11,r11}; 
union11() = BooleanUnion{ Volume{union10()}; Delete;}{ Volume{c11}; Delete;};
// ------ Vessel # 12 ------ 
ox12 = 40.0000; oy12 = 92.7073; oz12 = 40.0603; 
vx12 = 420.0000; vy12 = 0.0000; vz12 = 0.0000; r12 = 10.0000; 
c12 = newv; Cylinder(c12) = {ox12,oy12,oz12,vx12,vy12,vz12,r12}; 
union12() = BooleanUnion{ Volume{union11()}; Delete;}{ Volume{c12}; Delete;};
// ------ Vessel # 13 ------ 
ox13 = 92.1253; oy13 = 200.1717; oz13 = 40.0000; 
vx13 = 0.0000; vy13 = 0.0000; vz13 = 420.0000; r13 = 10.0000; 
c13 = newv; Cylinder(c13) = {ox13,oy13,oz13,vx13,vy13,vz13,r13}; 
union13() = BooleanUnion{ Volume{union12()}; Delete;}{ Volume{c13}; Delete;};
// ------ Vessel # 14 ------ 
ox14 = 243.4278; oy14 = 40.0000; oz14 = 280.4001; 
vx14 = 0.0000; vy14 = 420.0000; vz14 = 0.0000; r14 = 10.0000; 
c14 = newv; Cylinder(c14) = {ox14,oy14,oz14,vx14,vy14,vz14,r14}; 
union14() = BooleanUnion{ Volume{union13()}; Delete;}{ Volume{c14}; Delete;};
// ------ Vessel # 15 ------ 
ox15 = 325.7512; oy15 = 69.2667; oz15 = 40.0000; 
vx15 = 0.0000; vy15 = 0.0000; vz15 = 420.0000; r15 = 10.0000; 
c15 = newv; Cylinder(c15) = {ox15,oy15,oz15,vx15,vy15,vz15,r15}; 
union15() = BooleanUnion{ Volume{union14()}; Delete;}{ Volume{c15}; Delete;};
// ------ Vessel # 16 ------ 
ox16 = 228.5835; oy16 = 40.0000; oz16 = 337.6507; 
vx16 = 0.0000; vy16 = 420.0000; vz16 = 0.0000; r16 = 10.0000; 
c16 = newv; Cylinder(c16) = {ox16,oy16,oz16,vx16,vy16,vz16,r16}; 
union16() = BooleanUnion{ Volume{union15()}; Delete;}{ Volume{c16}; Delete;};
// ------ Vessel # 17 ------ 
ox17 = 40.0000; oy17 = 353.3272; oz17 = 195.9902; 
vx17 = 420.0000; vy17 = 0.0000; vz17 = 0.0000; r17 = 10.0000; 
c17 = newv; Cylinder(c17) = {ox17,oy17,oz17,vx17,vy17,vz17,r17}; 
union17() = BooleanUnion{ Volume{union16()}; Delete;}{ Volume{c17}; Delete;};
// ------ Vessel # 18 ------ 
ox18 = 40.0000; oy18 = 340.6347; oz18 = 392.6017; 
vx18 = 420.0000; vy18 = 0.0000; vz18 = 0.0000; r18 = 10.0000; 
c18 = newv; Cylinder(c18) = {ox18,oy18,oz18,vx18,vy18,vz18,r18}; 
union18() = BooleanUnion{ Volume{union17()}; Delete;}{ Volume{c18}; Delete;};
// ------ Vessel # 19 ------ 
ox19 = 40.0000; oy19 = 205.1062; oz19 = 143.3934; 
vx19 = 420.0000; vy19 = 0.0000; vz19 = 0.0000; r19 = 10.0000; 
c19 = newv; Cylinder(c19) = {ox19,oy19,oz19,vx19,vy19,vz19,r19}; 
union19() = BooleanUnion{ Volume{union18()}; Delete;}{ Volume{c19}; Delete;};

// ------- Definition of Entire Vessel Surface -------- 
sfinal() = Boundary{Volume{union19()};}; 
Physical Surface(1) = {sfinal()}; 

// ------- Definition of Final Volume -------- 
voxcyl() = BooleanDifference{Volume{v};}{Volume{union19()}; Delete;}; 
//Physical Volume(0) = {voxcyl()};