]> git.tdb.fi Git - r2c2.git/commitdiff
Basic support for beam gate sensors
authorMikko Rasa <tdb@tdb.fi>
Mon, 8 Jul 2013 18:10:30 +0000 (21:10 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 8 Jul 2013 20:18:01 +0000 (23:18 +0300)
15 files changed:
data/beamgate.object [new file with mode: 0644]
gfx.blend
source/3d/beamgate.cpp [new file with mode: 0644]
source/3d/beamgate.h [new file with mode: 0644]
source/3d/layout.cpp
source/libr2c2/beamgate.cpp [new file with mode: 0644]
source/libr2c2/beamgate.h [new file with mode: 0644]
source/libr2c2/beamgatetype.cpp [new file with mode: 0644]
source/libr2c2/beamgatetype.h [new file with mode: 0644]
source/libr2c2/blockallocator.cpp
source/libr2c2/blockallocator.h
source/libr2c2/layout.cpp
source/libr2c2/layout.h
source/libr2c2/train.cpp
tracks.dat

diff --git a/data/beamgate.object b/data/beamgate.object
new file mode 100644 (file)
index 0000000..4196e62
--- /dev/null
@@ -0,0 +1,2321 @@
+mesh
+{
+       vertices NORMAL3 TEXCOORD2 VERTEX3
+       {
+               normal3 -1 0 0;
+               texcoord2 0.1 0.5;
+               vertex3 -0.0025 -0.03 -2.32831e-09;
+               vertex3 -0.0025 0.03 -2.32831e-09;
+               normal3 0 1 0;
+               vertex3 0.0025 0.03 -2.32831e-09;
+               normal3 1 0 0;
+               vertex3 0.0025 -0.03 -2.32831e-09;
+               normal3 -1 0 0;
+               vertex3 -0.0025 -0.03 0.002;
+               vertex3 -0.0025 0.03 0.002;
+               normal3 0 1 0;
+               vertex3 0.0025 0.03 0.002;
+               normal3 1 0 0;
+               vertex3 0.0025 -0.03 0.002;
+               normal3 0 -0.991445 0.130525;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00089999 -0.0283 0.022;
+               normal3 1 1.71047e-05 -6.25784e-07;
+               vertex3 -0.00089999 -0.0277 0.022;
+               normal3 0.382678 0.923882 0;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00119999 -0.0274 0.002;
+               vertex3 -0.00119999 -0.0274 0.00500001;
+               vertex3 -0.000775723 -0.0275757 0.002;
+               vertex3 -0.000775723 -0.0275757 0.00500001;
+               normal3 0.92388 0.382682 0;
+               vertex3 -0.000599987 -0.028 0.002;
+               vertex3 -0.000599987 -0.028 0.00500001;
+               normal3 0.92388 -0.382682 0;
+               vertex3 -0.000775723 -0.0284243 0.002;
+               vertex3 -0.000775723 -0.0284243 0.00500001;
+               normal3 0.382678 -0.923882 0;
+               vertex3 -0.00119999 -0.0286 0.002;
+               vertex3 -0.00119999 -0.0286 0.00500001;
+               normal3 -0.382685 -0.923879 0;
+               vertex3 -0.00162425 -0.0284243 0.002;
+               vertex3 -0.00162425 -0.0284243 0.00500001;
+               normal3 -0.923879 -0.382685 0;
+               vertex3 -0.00179999 -0.028 0.002;
+               vertex3 -0.00179999 -0.028 0.00500001;
+               normal3 -0.382685 0.923879 0;
+               vertex3 -0.00162425 -0.0275757 0.002;
+               normal3 0 0 -1;
+               vertex3 -0.00162425 -0.0275757 0.00500001;
+               normal3 -1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00149998 -0.0277 0.022;
+               vertex3 -0.00149998 -0.0283 0.022;
+               normal3 0 -1 0;
+               vertex3 -0.00089999 -0.0283 0.0056;
+               normal3 -1 0 0;
+               vertex3 -0.00149998 -0.0277 0.0056;
+               normal3 0 -1 0;
+               vertex3 -0.00149998 -0.0283 0.0056;
+               normal3 1 0 0;
+               vertex3 -0.00089999 -0.0280857 0.0228;
+               vertex3 -0.00089999 -0.027566 0.0225;
+               normal3 -1 0 0;
+               vertex3 -0.00149998 -0.027566 0.0225;
+               vertex3 -0.00149998 -0.0280857 0.0228;
+               normal3 1 0 0;
+               vertex3 -0.00089999 -0.0275 0.0233857;
+               vertex3 -0.00089999 -0.0272 0.022866;
+               normal3 -1 0 0;
+               vertex3 -0.00149998 -0.0272 0.022866;
+               vertex3 -0.00149998 -0.0275 0.0233857;
+               normal3 0 -0.113358 0.993554;
+               vertex3 -0.00089999 -0.0267 0.0236;
+               normal3 1 0 0;
+               vertex3 -0.00089999 -0.0267 0.023;
+               normal3 -1 0 0;
+               vertex3 -0.00149998 -0.0267 0.023;
+               vertex3 -0.00149998 -0.0267 0.0236;
+               normal3 0 0 1;
+               vertex3 -0.000399989 -0.026 0.0236;
+               normal3 0 0 -1;
+               vertex3 -0.000399989 -0.026 0.023;
+               normal3 -1 0 0;
+               vertex3 -0.00149998 -0.026 0.023;
+               vertex3 -0.00149998 -0.026 0.0236;
+               normal3 -1.9642e-08 7.51966e-07 1;
+               texcoord2 0.3 0.5;
+               vertex3 1.49012e-08 -0.025 0.0248;
+               normal3 -0.92388 0.382682 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.000775753 -0.0275757 0.005;
+               normal3 0.5 0 0.866026;
+               texcoord2 0.3 0.5;
+               vertex3 0.00100002 -0.026 0.0250321;
+               normal3 2.9463e-08 0 1;
+               vertex3 1.49564e-08 -0.026 0.0253;
+               normal3 -0.5 0 0.866025;
+               vertex3 -0.000999985 -0.026 0.0250321;
+               normal3 -0.866025 0 0.5;
+               vertex3 -0.00173204 -0.026 0.0243;
+               normal3 0.5 2.22528e-07 -0.866025;
+               vertex3 0.000750015 -0.025 0.022001;
+               normal3 0.866026 2.09034e-07 -0.5;
+               vertex3 0.00129905 -0.025 0.02255;
+               normal3 1 3.88051e-07 -2.35704e-07;
+               vertex3 0.00150001 -0.025 0.0233;
+               normal3 0.866025 4.94655e-07 0.5;
+               vertex3 0.00129905 -0.025 0.02405;
+               normal3 -1 0 1.27673e-07;
+               vertex3 -0.00199999 -0.026 0.0233;
+               normal3 -0.858921 0.127828 0.495899;
+               vertex3 -0.00129902 -0.0223 0.02405;
+               normal3 -0.991796 0.127828 9.09952e-08;
+               vertex3 -0.00149999 -0.0223 0.0233;
+               normal3 -0.858921 0.127828 -0.495898;
+               vertex3 -0.00129902 -0.0223 0.02255;
+               normal3 -0.495898 0.127828 -0.858921;
+               vertex3 -0.000749985 -0.0223 0.022001;
+               normal3 1.01106e-08 0.127827 -0.991796;
+               vertex3 1.46747e-08 -0.0223 0.0218;
+               normal3 0.495898 0.127827 -0.858921;
+               vertex3 0.000750015 -0.0223 0.022001;
+               normal3 -6.27808e-08 0.482341 0.875983;
+               vertex3 1.49012e-08 -0.02155 0.024599;
+               normal3 -7.60914e-09 0.847434 0.5309;
+               vertex3 1.49012e-08 -0.021001 0.02405;
+               normal3 -7.64992e-09 1 -5.09995e-09;
+               vertex3 1.49012e-08 -0.0208 0.0233;
+               normal3 0.495898 0.127827 0.858921;
+               vertex3 0.000750015 -0.0223 0.024599;
+               normal3 0.437992 0.482342 0.758624;
+               vertex3 0.000649533 -0.02155 0.024425;
+               normal3 0.26545 0.847434 0.459773;
+               vertex3 0.000375015 -0.021001 0.0239495;
+               normal3 0.858921 0.127827 0.495898;
+               vertex3 0.00129905 -0.0223 0.02405;
+               normal3 0.758624 0.482342 0.437991;
+               vertex3 0.00112501 -0.02155 0.0239495;
+               normal3 0.459773 0.847434 0.265451;
+               vertex3 0.000649534 -0.021001 0.023675;
+               normal3 0.991796 0.127827 -1.97156e-07;
+               vertex3 0.00150001 -0.0223 0.0233;
+               normal3 0.875983 0.482342 -1.2033e-07;
+               vertex3 0.00129905 -0.02155 0.0233;
+               normal3 0.530901 0.847434 1.77547e-08;
+               vertex3 0.000750015 -0.021001 0.0233;
+               normal3 0.858921 0.127827 -0.495898;
+               vertex3 0.00129905 -0.0223 0.02255;
+               normal3 0.758624 0.482342 -0.437991;
+               vertex3 0.00112501 -0.02155 0.0226505;
+               normal3 0.459774 0.847434 -0.265451;
+               vertex3 0.000649534 -0.021001 0.022925;
+               normal3 0.437992 0.482342 -0.758623;
+               vertex3 0.000649533 -0.02155 0.022175;
+               normal3 0.26545 0.847434 -0.459773;
+               vertex3 0.000375015 -0.021001 0.0226505;
+               normal3 5.23173e-08 0.482342 -0.875983;
+               vertex3 1.50035e-08 -0.02155 0.022001;
+               normal3 -5.3264e-08 0.847434 -0.5309;
+               vertex3 1.47388e-08 -0.021001 0.02255;
+               normal3 -0.437991 0.482342 -0.758623;
+               vertex3 -0.000649503 -0.02155 0.022175;
+               normal3 -0.26545 0.847434 -0.459773;
+               vertex3 -0.000374985 -0.021001 0.0226505;
+               normal3 -0.758624 0.482342 -0.437991;
+               vertex3 -0.00112498 -0.02155 0.0226505;
+               normal3 -0.459773 0.847434 -0.265451;
+               vertex3 -0.000649504 -0.021001 0.022925;
+               normal3 -0.875983 0.482342 9.94029e-08;
+               vertex3 -0.00129902 -0.02155 0.0233;
+               normal3 -0.530901 0.847434 1.52183e-08;
+               vertex3 -0.000749985 -0.021001 0.0233;
+               normal3 -0.758623 0.482342 0.437992;
+               vertex3 -0.00112498 -0.02155 0.0239495;
+               normal3 -0.459774 0.847434 0.265451;
+               vertex3 -0.000649504 -0.021001 0.023675;
+               normal3 -0.495898 0.127827 0.858921;
+               vertex3 -0.000749984 -0.0223 0.024599;
+               normal3 -0.437991 0.482341 0.758624;
+               vertex3 -0.000649503 -0.02155 0.024425;
+               normal3 -0.26545 0.847434 0.459773;
+               vertex3 -0.000374985 -0.021001 0.0239495;
+               normal3 3.5387e-08 0.127826 0.991797;
+               vertex3 1.52967e-08 -0.0223 0.0248;
+               normal3 -0.92388 0.382682 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.000775753 -0.0275757 0.002;
+               normal3 -0.866026 0 -0.5;
+               texcoord2 0.3 0.5;
+               vertex3 -0.00173204 -0.026 0.0223;
+               normal3 -0.382678 0.923882 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.00120002 -0.0274 0.005;
+               normal3 -0.5 0 -0.866025;
+               texcoord2 0.3 0.5;
+               vertex3 -0.000999986 -0.026 0.021568;
+               normal3 0.499999 0 -0.866026;
+               vertex3 0.00100001 -0.025 0.021568;
+               normal3 0 1 0;
+               vertex3 1.47841e-08 -0.025 0.0218;
+               normal3 -1.9642e-08 0 -1;
+               vertex3 1.45435e-08 -0.025 0.0213;
+               normal3 0 1 0;
+               vertex3 -0.000749986 -0.025 0.022001;
+               normal3 -0.5 0 -0.866025;
+               vertex3 -0.000999986 -0.025 0.021568;
+               normal3 0 1 0;
+               vertex3 -0.00129902 -0.025 0.02255;
+               normal3 -0.866026 0 -0.5;
+               vertex3 -0.00173204 -0.025 0.0223;
+               normal3 0 1 0;
+               vertex3 -0.00149999 -0.025 0.0233;
+               normal3 -1 0 1.27673e-07;
+               vertex3 -0.00199999 -0.025 0.0233;
+               normal3 0 1 0;
+               vertex3 -0.00129902 -0.025 0.02405;
+               normal3 -0.866025 0 0.5;
+               vertex3 -0.00173204 -0.025 0.0243;
+               normal3 0 1 0;
+               vertex3 -0.000749986 -0.025 0.024599;
+               normal3 -0.5 0 0.866025;
+               vertex3 -0.000999985 -0.025 0.0250321;
+               normal3 -1.9642e-08 0 -1;
+               vertex3 1.45435e-08 -0.026 0.0213;
+               normal3 2.9463e-08 0 1;
+               vertex3 1.49564e-08 -0.025 0.0253;
+               normal3 0.499999 6.20742e-07 0.866026;
+               vertex3 0.000750015 -0.025 0.024599;
+               normal3 0.5 0 0.866026;
+               vertex3 0.00100002 -0.025 0.0250321;
+               normal3 0.499999 0 -0.866026;
+               vertex3 0.00100001 -0.026 0.021568;
+               normal3 -0.382678 0.923882 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.00120002 -0.0274 0.002;
+               normal3 -1 1.71047e-05 -6.25784e-07;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900019 -0.0277 0.022;
+               normal3 0 0 1;
+               vertex3 -0.000399989 -0.0267 0.0236;
+               normal3 1 0 0;
+               vertex3 -0.000399989 -0.0267 0.023;
+               normal3 0 0 -1;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00119999 -0.0272 0.00500001;
+               vertex3 -0.000634302 -0.0274343 0.00500001;
+               vertex3 -0.000399987 -0.028 0.00500001;
+               vertex3 -0.000634302 -0.0285657 0.00500001;
+               vertex3 -0.00119999 -0.0288 0.00500001;
+               vertex3 -0.00176567 -0.0285657 0.00500001;
+               vertex3 -0.00199999 -0.028 0.00500001;
+               vertex3 -0.00176567 -0.0274343 0.00500001;
+               normal3 0.382679 0.923881 0;
+               vertex3 -0.00119999 -0.0272 0.00600001;
+               vertex3 -0.000634302 -0.0274343 0.00600001;
+               normal3 0.92388 -0.382683 0;
+               vertex3 -0.000399987 -0.028 0.00600001;
+               normal3 0.382679 -0.923881 0;
+               vertex3 -0.000634302 -0.0285657 0.00600001;
+               vertex3 -0.00119999 -0.0288 0.00600001;
+               normal3 -0.923879 -0.382685 0;
+               vertex3 -0.00176567 -0.0285657 0.00600001;
+               vertex3 -0.00199999 -0.028 0.00600001;
+               normal3 -0.382684 0.923879 0;
+               vertex3 -0.00176567 -0.0274343 0.00600001;
+               normal3 -4.65783e-06 -1.12451e-05 1;
+               vertex3 -0.00119999 -0.0275758 0.00560001;
+               normal3 -0.515343 -0.515345 0.68472;
+               vertex3 -0.000900034 -0.0277001 0.00560001;
+               normal3 -0.728827 -2.83519e-05 0.684697;
+               vertex3 -0.000775789 -0.028 0.00560001;
+               normal3 0 2.24972e-05 1;
+               vertex3 -0.00119999 -0.0284242 0.00560001;
+               normal3 2.24957e-05 0 1;
+               vertex3 -0.00162419 -0.028 0.00560001;
+               normal3 0 -0.991445 0.130525;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900019 -0.0283 0.022;
+               normal3 0.707106 0 0.707107;
+               texcoord2 0.3 0.5;
+               vertex3 0.00149996 -0.026 0.0245321;
+               normal3 0 1 0;
+               vertex3 0.00149996 -0.025 0.0245321;
+               normal3 0.382685 -0.923879 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.00162428 -0.0284243 0.005;
+               normal3 0.923879 -0.382685 0;
+               vertex3 0.00180002 -0.028 0.002;
+               vertex3 0.00180002 -0.028 0.005;
+               normal3 0.382685 0.923879 0;
+               vertex3 0.00162428 -0.0275757 0.002;
+               normal3 0.707106 0 -0.707107;
+               texcoord2 0.3 0.5;
+               vertex3 0.00149996 -0.026 0.0220679;
+               vertex3 0.00149996 -0.025 0.0220679;
+               normal3 -0.92388 -0.382682 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.000600017 -0.028 0.002;
+               vertex3 0.000600017 -0.028 0.005;
+               normal3 0.382685 -0.923879 0;
+               vertex3 0.00162428 -0.0284243 0.002;
+               normal3 -0.382678 -0.923882 0;
+               vertex3 0.000775753 -0.0284243 0.002;
+               vertex3 0.000775753 -0.0284243 0.005;
+               vertex3 0.00120002 -0.0286 0.002;
+               vertex3 0.00120002 -0.0286 0.005;
+               normal3 0 0 -1;
+               vertex3 0.00162428 -0.0275757 0.005;
+               normal3 1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 -0.0277 0.022;
+               vertex3 0.00150001 -0.0283 0.022;
+               normal3 0 -1 0;
+               vertex3 0.000900019 -0.0283 0.0056;
+               normal3 1 0 0;
+               vertex3 0.00150001 -0.0277 0.0056;
+               normal3 0 -1 0;
+               vertex3 0.00150001 -0.0283 0.0056;
+               normal3 -1 0 0;
+               vertex3 0.000900019 -0.0280857 0.0228;
+               vertex3 0.000900019 -0.027566 0.0225;
+               normal3 1 0 0;
+               vertex3 0.00150001 -0.027566 0.0225;
+               vertex3 0.00150001 -0.0280857 0.0228;
+               normal3 -1 0 0;
+               vertex3 0.000900019 -0.0275 0.0233857;
+               vertex3 0.000900019 -0.0272 0.022866;
+               normal3 1 0 0;
+               vertex3 0.00150001 -0.0272 0.022866;
+               vertex3 0.00150001 -0.0275 0.0233857;
+               normal3 0 -0.113358 0.993554;
+               vertex3 0.000900019 -0.0267 0.0236;
+               normal3 -1 0 0;
+               vertex3 0.000900019 -0.0267 0.023;
+               normal3 1 0 0;
+               vertex3 0.00150001 -0.0267 0.023;
+               vertex3 0.00150001 -0.0267 0.0236;
+               normal3 0 0 1;
+               vertex3 0.000400019 -0.026 0.0236;
+               normal3 0 0 -1;
+               vertex3 0.000400019 -0.026 0.023;
+               normal3 1 3.28521e-06 -2.28003e-05;
+               texcoord2 0.3 0.5;
+               vertex3 0.00150001 -0.026 0.023;
+               normal3 1 3.28555e-06 2.28007e-05;
+               vertex3 0.00150001 -0.026 0.0236;
+               normal3 0 0 1;
+               texcoord2 0.5 0.5;
+               vertex3 0.000400019 -0.0267 0.0236;
+               normal3 -1 0 0;
+               vertex3 0.000400019 -0.0267 0.023;
+               normal3 0 0 -1;
+               texcoord2 0.7 0.5;
+               vertex3 0.00120002 -0.0272 0.005;
+               vertex3 0.000634332 -0.0274343 0.005;
+               vertex3 0.000400017 -0.028 0.005;
+               vertex3 0.000634332 -0.0285657 0.005;
+               vertex3 0.00120002 -0.0288 0.005;
+               vertex3 0.0017657 -0.0285657 0.005;
+               vertex3 0.00200002 -0.028 0.005;
+               vertex3 0.0017657 -0.0274343 0.005;
+               normal3 -0.382679 0.923881 0;
+               vertex3 0.00120002 -0.0272 0.006;
+               vertex3 0.000634332 -0.0274343 0.006;
+               normal3 -0.92388 -0.382683 0;
+               vertex3 0.000400017 -0.028 0.006;
+               normal3 -0.382679 -0.923881 0;
+               vertex3 0.000634332 -0.0285657 0.006;
+               vertex3 0.00120002 -0.0288 0.006;
+               normal3 0.923879 -0.382685 0;
+               vertex3 0.0017657 -0.0285657 0.006;
+               vertex3 0.00200002 -0.028 0.006;
+               normal3 0.382684 0.923879 0;
+               vertex3 0.0017657 -0.0274343 0.006;
+               normal3 4.65783e-06 -1.12451e-05 1;
+               vertex3 0.00120002 -0.0275758 0.00560001;
+               normal3 0.515343 -0.515344 0.68472;
+               vertex3 0.000900064 -0.0277001 0.00560001;
+               normal3 0.728827 -2.83519e-05 0.684698;
+               vertex3 0.000775819 -0.028 0.00560001;
+               normal3 0 2.24972e-05 1;
+               vertex3 0.00120002 -0.0284242 0.00560001;
+               normal3 -2.24957e-05 0 1;
+               vertex3 0.00162421 -0.028 0.00560001;
+               normal3 0 0.991445 0.130525;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00089999 0.0283 0.022;
+               normal3 1 -1.71047e-05 -6.25784e-07;
+               vertex3 -0.00089999 0.0277 0.022;
+               normal3 0.382678 -0.923882 0;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00119999 0.0274 0.002;
+               vertex3 -0.00119999 0.0274 0.005;
+               vertex3 -0.000775723 0.0275757 0.002;
+               vertex3 -0.000775723 0.0275757 0.005;
+               normal3 0.92388 -0.382682 0;
+               vertex3 -0.000599987 0.028 0.002;
+               vertex3 -0.000599987 0.028 0.005;
+               normal3 0.92388 0.382682 0;
+               vertex3 -0.000775723 0.0284243 0.002;
+               vertex3 -0.000775723 0.0284243 0.005;
+               normal3 0.382678 0.923882 0;
+               vertex3 -0.00119999 0.0286 0.002;
+               vertex3 -0.00119999 0.0286 0.005;
+               normal3 -0.382685 0.923879 0;
+               vertex3 -0.00162425 0.0284243 0.002;
+               vertex3 -0.00162425 0.0284243 0.005;
+               normal3 -0.923879 0.382685 0;
+               vertex3 -0.00179999 0.028 0.002;
+               vertex3 -0.00179999 0.028 0.005;
+               normal3 -0.382685 -0.923879 0;
+               vertex3 -0.00162425 0.0275757 0.002;
+               normal3 0 0 -1;
+               vertex3 -0.00162425 0.0275757 0.005;
+               normal3 -1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00149998 0.0277 0.022;
+               vertex3 -0.00149998 0.0283 0.022;
+               normal3 0 1 0;
+               vertex3 -0.00089999 0.0283 0.0056;
+               normal3 -1 0 0;
+               vertex3 -0.00149998 0.0277 0.0056;
+               normal3 0 1 0;
+               vertex3 -0.00149998 0.0283 0.0056;
+               normal3 1 0 0;
+               vertex3 -0.00089999 0.0280856 0.0228;
+               vertex3 -0.00089999 0.027566 0.0225;
+               normal3 -1 0 0;
+               vertex3 -0.00149998 0.027566 0.0225;
+               vertex3 -0.00149998 0.0280856 0.0228;
+               normal3 1 0 0;
+               vertex3 -0.00089999 0.0275 0.0233857;
+               vertex3 -0.00089999 0.0272 0.022866;
+               normal3 -1 0 0;
+               vertex3 -0.00149998 0.0272 0.022866;
+               vertex3 -0.00149998 0.0275 0.0233857;
+               normal3 0 0.113358 0.993554;
+               vertex3 -0.00089999 0.0267 0.0236;
+               normal3 1 0 0;
+               vertex3 -0.00089999 0.0267 0.023;
+               normal3 -1 0 0;
+               vertex3 -0.00149998 0.0267 0.023;
+               vertex3 -0.00149998 0.0267 0.0236;
+               normal3 0 0 1;
+               vertex3 -0.000399989 0.026 0.0236;
+               normal3 0 0 -1;
+               vertex3 -0.000399989 0.026 0.023;
+               normal3 -1 0 0;
+               vertex3 -0.00149998 0.026 0.023;
+               vertex3 -0.00149998 0.026 0.0236;
+               normal3 -1.9642e-08 -7.51966e-07 1;
+               texcoord2 0.9 0.5;
+               vertex3 1.49012e-08 0.025 0.0248;
+               normal3 -0.92388 -0.382682 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.000775753 0.0275757 0.005;
+               normal3 0.5 0 0.866026;
+               texcoord2 0.9 0.5;
+               vertex3 0.00100002 0.026 0.0250321;
+               normal3 2.9463e-08 0 1;
+               vertex3 1.49564e-08 0.026 0.0253;
+               normal3 -0.5 0 0.866025;
+               vertex3 -0.000999985 0.026 0.0250321;
+               normal3 -0.866025 0 0.5;
+               vertex3 -0.00173204 0.026 0.0243;
+               normal3 0.5 -2.22528e-07 -0.866025;
+               vertex3 0.000750015 0.025 0.022001;
+               normal3 0.866026 -2.09034e-07 -0.5;
+               vertex3 0.00129905 0.025 0.02255;
+               normal3 1 -3.88051e-07 -2.35704e-07;
+               vertex3 0.00150001 0.025 0.0233;
+               normal3 0.866025 -4.94655e-07 0.5;
+               vertex3 0.00129905 0.025 0.02405;
+               normal3 -1 0 1.27673e-07;
+               vertex3 -0.00199999 0.026 0.0233;
+               normal3 -0.858921 -0.127828 0.495899;
+               vertex3 -0.00129902 0.0223 0.02405;
+               normal3 -0.991796 -0.127828 9.09952e-08;
+               vertex3 -0.00149999 0.0223 0.0233;
+               normal3 -0.858921 -0.127828 -0.495898;
+               vertex3 -0.00129902 0.0223 0.02255;
+               normal3 -0.495898 -0.127828 -0.858921;
+               vertex3 -0.000749985 0.0223 0.022001;
+               normal3 1.01106e-08 -0.127827 -0.991796;
+               vertex3 1.46747e-08 0.0223 0.0218;
+               normal3 0.495898 -0.127827 -0.858921;
+               vertex3 0.000750015 0.0223 0.022001;
+               normal3 -6.27808e-08 -0.482341 0.875983;
+               vertex3 1.49012e-08 0.02155 0.024599;
+               normal3 -7.60914e-09 -0.847434 0.5309;
+               vertex3 1.49012e-08 0.021001 0.02405;
+               normal3 -7.64992e-09 -1 -5.09995e-09;
+               vertex3 1.49012e-08 0.0208 0.0233;
+               normal3 0.495898 -0.127827 0.858921;
+               vertex3 0.000750015 0.0223 0.024599;
+               normal3 0.437992 -0.482342 0.758624;
+               vertex3 0.000649533 0.02155 0.024425;
+               normal3 0.26545 -0.847434 0.459773;
+               vertex3 0.000375015 0.021001 0.0239495;
+               normal3 0.858921 -0.127827 0.495898;
+               vertex3 0.00129905 0.0223 0.02405;
+               normal3 0.758624 -0.482342 0.437991;
+               vertex3 0.00112501 0.02155 0.0239495;
+               normal3 0.459773 -0.847434 0.265451;
+               vertex3 0.000649534 0.021001 0.023675;
+               normal3 0.991796 -0.127827 -1.97156e-07;
+               vertex3 0.00150001 0.0223 0.0233;
+               normal3 0.875983 -0.482342 -1.2033e-07;
+               vertex3 0.00129905 0.02155 0.0233;
+               normal3 0.530901 -0.847434 1.77547e-08;
+               vertex3 0.000750015 0.021001 0.0233;
+               normal3 0.858921 -0.127827 -0.495898;
+               vertex3 0.00129905 0.0223 0.02255;
+               normal3 0.758624 -0.482342 -0.437991;
+               vertex3 0.00112501 0.02155 0.0226505;
+               normal3 0.459774 -0.847434 -0.265451;
+               vertex3 0.000649534 0.021001 0.022925;
+               normal3 0.437992 -0.482342 -0.758623;
+               vertex3 0.000649533 0.02155 0.022175;
+               normal3 0.26545 -0.847434 -0.459773;
+               vertex3 0.000375015 0.021001 0.0226505;
+               normal3 5.23173e-08 -0.482342 -0.875983;
+               vertex3 1.50035e-08 0.02155 0.022001;
+               normal3 -5.3264e-08 -0.847434 -0.5309;
+               vertex3 1.47388e-08 0.021001 0.02255;
+               normal3 -0.437991 -0.482342 -0.758623;
+               vertex3 -0.000649503 0.02155 0.022175;
+               normal3 -0.26545 -0.847434 -0.459773;
+               vertex3 -0.000374985 0.021001 0.0226505;
+               normal3 -0.758624 -0.482342 -0.437991;
+               vertex3 -0.00112498 0.02155 0.0226505;
+               normal3 -0.459773 -0.847434 -0.265451;
+               vertex3 -0.000649504 0.021001 0.022925;
+               normal3 -0.875983 -0.482342 9.94029e-08;
+               vertex3 -0.00129902 0.02155 0.0233;
+               normal3 -0.530901 -0.847434 1.52183e-08;
+               vertex3 -0.000749985 0.021001 0.0233;
+               normal3 -0.758623 -0.482342 0.437992;
+               vertex3 -0.00112498 0.02155 0.0239495;
+               normal3 -0.459774 -0.847434 0.265451;
+               vertex3 -0.000649504 0.021001 0.023675;
+               normal3 -0.495898 -0.127827 0.858921;
+               vertex3 -0.000749984 0.0223 0.024599;
+               normal3 -0.437991 -0.482341 0.758624;
+               vertex3 -0.000649503 0.02155 0.024425;
+               normal3 -0.26545 -0.847434 0.459773;
+               vertex3 -0.000374985 0.021001 0.0239495;
+               normal3 3.5387e-08 -0.127826 0.991797;
+               vertex3 1.52967e-08 0.0223 0.0248;
+               normal3 -0.92388 -0.382682 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.000775753 0.0275757 0.002;
+               normal3 -0.866026 0 -0.5;
+               texcoord2 0.9 0.5;
+               vertex3 -0.00173204 0.026 0.0223;
+               normal3 -0.382678 -0.923882 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.00120002 0.0274 0.005;
+               normal3 -0.5 0 -0.866025;
+               texcoord2 0.9 0.5;
+               vertex3 -0.000999986 0.026 0.021568;
+               normal3 0.499999 0 -0.866026;
+               vertex3 0.00100001 0.025 0.021568;
+               normal3 0 -1 0;
+               vertex3 1.47841e-08 0.025 0.0218;
+               normal3 -1.9642e-08 0 -1;
+               vertex3 1.45435e-08 0.025 0.0213;
+               normal3 0 -1 0;
+               vertex3 -0.000749986 0.025 0.022001;
+               normal3 -0.5 0 -0.866025;
+               vertex3 -0.000999986 0.025 0.021568;
+               normal3 0 -1 0;
+               vertex3 -0.00129902 0.025 0.02255;
+               normal3 -0.866026 0 -0.5;
+               vertex3 -0.00173204 0.025 0.0223;
+               normal3 0 -1 0;
+               vertex3 -0.00149999 0.025 0.0233;
+               normal3 -1 0 1.27673e-07;
+               vertex3 -0.00199999 0.025 0.0233;
+               normal3 0 -1 0;
+               vertex3 -0.00129902 0.025 0.02405;
+               normal3 -0.866025 0 0.5;
+               vertex3 -0.00173204 0.025 0.0243;
+               normal3 0 -1 0;
+               vertex3 -0.000749986 0.025 0.024599;
+               normal3 -0.5 0 0.866025;
+               vertex3 -0.000999985 0.025 0.0250321;
+               normal3 -1.9642e-08 0 -1;
+               vertex3 1.45435e-08 0.026 0.0213;
+               normal3 2.9463e-08 0 1;
+               vertex3 1.49564e-08 0.025 0.0253;
+               normal3 0.499999 -6.20742e-07 0.866026;
+               vertex3 0.000750015 0.025 0.024599;
+               normal3 0.5 0 0.866026;
+               vertex3 0.00100002 0.025 0.0250321;
+               normal3 0.499999 0 -0.866026;
+               vertex3 0.00100001 0.026 0.021568;
+               normal3 -0.382678 -0.923882 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.00120002 0.0274 0.002;
+               normal3 -1 -1.71047e-05 -6.25784e-07;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900019 0.0277 0.022;
+               normal3 0 0 1;
+               vertex3 -0.000399989 0.0267 0.0236;
+               normal3 1 0 0;
+               vertex3 -0.000399989 0.0267 0.023;
+               normal3 0 0 -1;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00119999 0.0272 0.005;
+               vertex3 -0.000634302 0.0274343 0.005;
+               vertex3 -0.000399987 0.028 0.005;
+               vertex3 -0.000634302 0.0285657 0.005;
+               vertex3 -0.00119999 0.0288 0.005;
+               vertex3 -0.00176567 0.0285657 0.005;
+               vertex3 -0.00199999 0.028 0.005;
+               vertex3 -0.00176567 0.0274343 0.005;
+               normal3 0.382679 -0.923881 0;
+               vertex3 -0.00119999 0.0272 0.006;
+               vertex3 -0.000634302 0.0274343 0.006;
+               normal3 0.92388 0.382683 0;
+               vertex3 -0.000399987 0.028 0.006;
+               normal3 0.382679 0.923881 0;
+               vertex3 -0.000634302 0.0285657 0.006;
+               vertex3 -0.00119999 0.0288 0.006;
+               normal3 -0.923879 0.382685 0;
+               vertex3 -0.00176567 0.0285657 0.006;
+               vertex3 -0.00199999 0.028 0.006;
+               normal3 -0.382684 -0.923879 0;
+               vertex3 -0.00176567 0.0274343 0.006;
+               normal3 -4.65783e-06 1.12451e-05 1;
+               vertex3 -0.00119999 0.0275758 0.00560001;
+               normal3 -0.515343 0.515344 0.68472;
+               vertex3 -0.000900034 0.0277 0.00560001;
+               normal3 -0.728827 2.83519e-05 0.684698;
+               vertex3 -0.000775789 0.028 0.00560001;
+               normal3 0 -2.24972e-05 1;
+               vertex3 -0.00119999 0.0284242 0.00560001;
+               normal3 2.24957e-05 0 1;
+               vertex3 -0.00162419 0.028 0.00560001;
+               normal3 0 0.991445 0.130525;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900019 0.0283 0.022;
+               normal3 0.707106 0 0.707107;
+               texcoord2 0.9 0.5;
+               vertex3 0.00149996 0.026 0.0245321;
+               normal3 0 -1 0;
+               vertex3 0.00149996 0.025 0.0245321;
+               normal3 0.382685 0.923879 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.00162428 0.0284243 0.005;
+               normal3 0.923879 0.382685 0;
+               vertex3 0.00180002 0.028 0.002;
+               vertex3 0.00180002 0.028 0.005;
+               normal3 0.382685 -0.923879 0;
+               vertex3 0.00162428 0.0275757 0.002;
+               normal3 0.707106 0 -0.707107;
+               texcoord2 0.9 0.5;
+               vertex3 0.00149996 0.026 0.0220679;
+               vertex3 0.00149996 0.025 0.0220679;
+               normal3 -0.92388 0.382682 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.000600017 0.028 0.002;
+               vertex3 0.000600017 0.028 0.005;
+               normal3 0.382685 0.923879 0;
+               vertex3 0.00162428 0.0284243 0.002;
+               normal3 -0.382678 0.923882 0;
+               vertex3 0.000775753 0.0284243 0.002;
+               vertex3 0.000775753 0.0284243 0.005;
+               vertex3 0.00120002 0.0286 0.002;
+               vertex3 0.00120002 0.0286 0.005;
+               normal3 0 0 -1;
+               vertex3 0.00162428 0.0275757 0.005;
+               normal3 1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 0.0277 0.022;
+               vertex3 0.00150001 0.0283 0.022;
+               normal3 0 1 0;
+               vertex3 0.000900019 0.0283 0.0056;
+               normal3 1 0 0;
+               vertex3 0.00150001 0.0277 0.0056;
+               normal3 0 1 0;
+               vertex3 0.00150001 0.0283 0.0056;
+               normal3 -1 0 0;
+               vertex3 0.000900019 0.0280856 0.0228;
+               vertex3 0.000900019 0.027566 0.0225;
+               normal3 1 0 0;
+               vertex3 0.00150001 0.027566 0.0225;
+               vertex3 0.00150001 0.0280856 0.0228;
+               normal3 -1 0 0;
+               vertex3 0.000900019 0.0275 0.0233857;
+               vertex3 0.000900019 0.0272 0.022866;
+               normal3 1 0 0;
+               vertex3 0.00150001 0.0272 0.022866;
+               vertex3 0.00150001 0.0275 0.0233857;
+               normal3 0 0.113358 0.993554;
+               vertex3 0.000900019 0.0267 0.0236;
+               normal3 -1 0 0;
+               vertex3 0.000900019 0.0267 0.023;
+               normal3 1 0 0;
+               vertex3 0.00150001 0.0267 0.023;
+               vertex3 0.00150001 0.0267 0.0236;
+               normal3 0 0 1;
+               vertex3 0.000400019 0.026 0.0236;
+               normal3 0 0 -1;
+               vertex3 0.000400019 0.026 0.023;
+               normal3 1 -3.28521e-06 -2.28003e-05;
+               texcoord2 0.9 0.5;
+               vertex3 0.00150001 0.026 0.023;
+               normal3 1 -3.28555e-06 2.28007e-05;
+               vertex3 0.00150001 0.026 0.0236;
+               normal3 0 0 1;
+               texcoord2 0.5 0.5;
+               vertex3 0.000400019 0.0267 0.0236;
+               normal3 -1 0 0;
+               vertex3 0.000400019 0.0267 0.023;
+               normal3 0 0 -1;
+               texcoord2 0.7 0.5;
+               vertex3 0.00120002 0.0272 0.005;
+               vertex3 0.000634332 0.0274343 0.005;
+               vertex3 0.000400017 0.028 0.005;
+               vertex3 0.000634332 0.0285657 0.005;
+               vertex3 0.00120002 0.0288 0.005;
+               vertex3 0.0017657 0.0285657 0.005;
+               vertex3 0.00200002 0.028 0.005;
+               vertex3 0.0017657 0.0274343 0.005;
+               normal3 -0.382679 -0.923881 0;
+               vertex3 0.00120002 0.0272 0.006;
+               vertex3 0.000634332 0.0274343 0.006;
+               normal3 -0.92388 0.382683 0;
+               vertex3 0.000400017 0.028 0.006;
+               normal3 -0.382679 0.923881 0;
+               vertex3 0.000634332 0.0285657 0.006;
+               vertex3 0.00120002 0.0288 0.006;
+               normal3 0.923879 0.382685 0;
+               vertex3 0.0017657 0.0285657 0.006;
+               vertex3 0.00200002 0.028 0.006;
+               normal3 0.382684 -0.923879 0;
+               vertex3 0.0017657 0.0274343 0.006;
+               normal3 4.65783e-06 1.12451e-05 1;
+               vertex3 0.00120002 0.0275758 0.00560001;
+               normal3 0.515343 0.515344 0.68472;
+               vertex3 0.000900064 0.0277 0.00560001;
+               normal3 0.728827 2.83519e-05 0.684698;
+               vertex3 0.000775819 0.028 0.00560001;
+               normal3 0 -2.24972e-05 1;
+               vertex3 0.00120002 0.0284242 0.00560001;
+               normal3 -2.24957e-05 0 1;
+               vertex3 0.00162421 0.028 0.00560001;
+               normal3 0 -1 0;
+               texcoord2 0.1 0.5;
+               vertex3 -0.0025 -0.03 -2.32831e-09;
+               normal3 0 0 -1;
+               vertex3 -0.0025 -0.03 -2.32831e-09;
+               normal3 0 1 0;
+               vertex3 -0.0025 0.03 -2.32831e-09;
+               normal3 0 0 -1;
+               vertex3 -0.0025 0.03 -2.32831e-09;
+               normal3 1 0 0;
+               vertex3 0.0025 0.03 -2.32831e-09;
+               normal3 0 0 -1;
+               vertex3 0.0025 0.03 -2.32831e-09;
+               normal3 0 -1 0;
+               vertex3 0.0025 -0.03 -2.32831e-09;
+               normal3 0 0 -1;
+               vertex3 0.0025 -0.03 -2.32831e-09;
+               normal3 0 -1 0;
+               vertex3 -0.0025 -0.03 0.002;
+               normal3 0 0 1;
+               vertex3 -0.0025 -0.03 0.002;
+               normal3 0 1 0;
+               vertex3 -0.0025 0.03 0.002;
+               normal3 0 0 1;
+               vertex3 -0.0025 0.03 0.002;
+               normal3 1 0 0;
+               vertex3 0.0025 0.03 0.002;
+               normal3 0 0 1;
+               vertex3 0.0025 0.03 0.002;
+               normal3 0 -1 0;
+               vertex3 0.0025 -0.03 0.002;
+               normal3 0 0 1;
+               vertex3 0.0025 -0.03 0.002;
+               normal3 1 2.02146e-05 -7.39561e-07;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00089999 -0.0283 0.022;
+               normal3 1.8788e-05 0.991445 -0.130524;
+               vertex3 -0.00089999 -0.0277 0.022;
+               normal3 -0.382685 0.923879 0;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00119999 -0.0274 0.002;
+               normal3 0 0 -1;
+               vertex3 -0.00119999 -0.0274 0.00500001;
+               normal3 -0.382685 0.923879 0;
+               vertex3 -0.00119999 -0.0274 0.00500001;
+               normal3 0.92388 0.382682 0;
+               vertex3 -0.000775723 -0.0275757 0.002;
+               vertex3 -0.000775723 -0.0275757 0.00500001;
+               normal3 0 0 -1;
+               vertex3 -0.000775723 -0.0275757 0.00500001;
+               normal3 0.92388 -0.382682 0;
+               vertex3 -0.000599987 -0.028 0.002;
+               vertex3 -0.000599987 -0.028 0.00500001;
+               normal3 0 0 -1;
+               vertex3 -0.000599987 -0.028 0.00500001;
+               normal3 0.382678 -0.923882 0;
+               vertex3 -0.000775723 -0.0284243 0.002;
+               vertex3 -0.000775723 -0.0284243 0.00500001;
+               normal3 0 0 -1;
+               vertex3 -0.000775723 -0.0284243 0.00500001;
+               normal3 -0.382685 -0.923879 0;
+               vertex3 -0.00119999 -0.0286 0.002;
+               vertex3 -0.00119999 -0.0286 0.00500001;
+               normal3 0 0 -1;
+               vertex3 -0.00119999 -0.0286 0.00500001;
+               normal3 -0.923879 -0.382685 0;
+               vertex3 -0.00162425 -0.0284243 0.002;
+               vertex3 -0.00162425 -0.0284243 0.00500001;
+               normal3 0 0 -1;
+               vertex3 -0.00162425 -0.0284243 0.00500001;
+               normal3 -0.923879 0.382685 0;
+               vertex3 -0.00179999 -0.028 0.002;
+               vertex3 -0.00179999 -0.028 0.00500001;
+               normal3 0 0 -1;
+               vertex3 -0.00179999 -0.028 0.00500001;
+               normal3 -0.923879 0.382685 0;
+               vertex3 -0.00162425 -0.0275757 0.002;
+               normal3 -0.382685 0.923879 0;
+               vertex3 -0.00162425 -0.0275757 0.00500001;
+               normal3 -0.923879 0.382685 0;
+               vertex3 -0.00162425 -0.0275757 0.00500001;
+               normal3 1.8788e-05 0.991445 -0.130524;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00149998 -0.0277 0.022;
+               normal3 0 -0.991445 0.130525;
+               vertex3 -0.00149998 -0.0283 0.022;
+               normal3 0 2.24972e-05 1;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00089999 -0.0283 0.0056;
+               normal3 -1.12449e-05 -4.65777e-06 1;
+               vertex3 -0.00089999 -0.0283 0.0056;
+               normal3 1 3.70601e-05 -1.35586e-06;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00089999 -0.0283 0.0056;
+               normal3 -0.515356 0.515363 0.684696;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00089999 -0.0283 0.0056;
+               normal3 -4.65783e-06 -1.12451e-05 1;
+               vertex3 -0.00149998 -0.0277 0.0056;
+               normal3 2.24956e-05 0 1;
+               vertex3 -0.00149998 -0.0277 0.0056;
+               normal3 3.72546e-05 1 -1.36296e-06;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00149998 -0.0277 0.0056;
+               normal3 0.515359 -0.515361 0.684696;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00149998 -0.0277 0.0056;
+               normal3 -1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00149998 -0.0283 0.0056;
+               normal3 0 2.24972e-05 1;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00149998 -0.0283 0.0056;
+               normal3 2.24956e-05 0 1;
+               vertex3 -0.00149998 -0.0283 0.0056;
+               normal3 0.515357 0.515365 0.684694;
+               vertex3 -0.00149998 -0.0283 0.0056;
+               normal3 0 -0.866027 0.499997;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00089999 -0.0280857 0.0228;
+               normal3 0 0.866029 -0.499994;
+               vertex3 -0.00089999 -0.027566 0.0225;
+               vertex3 -0.00149998 -0.027566 0.0225;
+               normal3 0 -0.866027 0.499997;
+               vertex3 -0.00149998 -0.0280857 0.0228;
+               normal3 0 -0.500002 0.866024;
+               vertex3 -0.00089999 -0.0275 0.0233857;
+               normal3 0 0.500005 -0.866022;
+               vertex3 -0.00089999 -0.0272 0.022866;
+               vertex3 -0.00149998 -0.0272 0.022866;
+               normal3 0 -0.500002 0.866024;
+               vertex3 -0.00149998 -0.0275 0.0233857;
+               normal3 1 0 0;
+               vertex3 -0.00089999 -0.0267 0.0236;
+               normal3 0 -1 0;
+               vertex3 -0.00089999 -0.0267 0.0236;
+               normal3 0 0.113359 -0.993554;
+               vertex3 -0.00089999 -0.0267 0.023;
+               normal3 0 -1 0;
+               vertex3 -0.00089999 -0.0267 0.023;
+               normal3 0 0.130528 -0.991445;
+               vertex3 -0.00149998 -0.0267 0.023;
+               normal3 0 -0.130527 0.991445;
+               vertex3 -0.00149998 -0.0267 0.0236;
+               normal3 1 0 0;
+               vertex3 -0.000399989 -0.026 0.0236;
+               normal3 0 -1 0;
+               texcoord2 0.3 0.5;
+               vertex3 -0.000399989 -0.026 0.0236;
+               normal3 1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 -0.000399989 -0.026 0.023;
+               normal3 0 -1 0;
+               texcoord2 0.3 0.5;
+               vertex3 -0.000399989 -0.026 0.023;
+               normal3 0 0 -1;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00149998 -0.026 0.023;
+               normal3 0 -1 0;
+               texcoord2 0.3 0.5;
+               vertex3 -0.00149998 -0.026 0.023;
+               normal3 0 0 1;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00149998 -0.026 0.0236;
+               normal3 0 -1 0;
+               texcoord2 0.3 0.5;
+               vertex3 -0.00149998 -0.026 0.0236;
+               normal3 0 1 0;
+               vertex3 1.49012e-08 -0.025 0.0248;
+               normal3 -0.382678 0.923882 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.000775753 -0.0275757 0.005;
+               normal3 0 0 -1;
+               vertex3 0.000775753 -0.0275757 0.005;
+               normal3 0 -1 0;
+               texcoord2 0.3 0.5;
+               vertex3 0.00100002 -0.026 0.0250321;
+               vertex3 1.49564e-08 -0.026 0.0253;
+               vertex3 -0.000999985 -0.026 0.0250321;
+               vertex3 -0.00173204 -0.026 0.0243;
+               normal3 0 1 0;
+               vertex3 0.000750015 -0.025 0.022001;
+               vertex3 0.00129905 -0.025 0.02255;
+               normal3 1 6.5223e-06 -1.37854e-10;
+               vertex3 0.00150001 -0.025 0.0233;
+               normal3 0 1 0;
+               vertex3 0.00150001 -0.025 0.0233;
+               vertex3 0.00150001 -0.025 0.0233;
+               vertex3 0.00129905 -0.025 0.02405;
+               normal3 0 -1 0;
+               vertex3 -0.00199999 -0.026 0.0233;
+               normal3 -0.382678 0.923882 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.000775753 -0.0275757 0.002;
+               normal3 0 -1 0;
+               texcoord2 0.3 0.5;
+               vertex3 -0.00173204 -0.026 0.0223;
+               normal3 0 0 -1;
+               texcoord2 0.7 0.5;
+               vertex3 0.00120002 -0.0274 0.005;
+               normal3 0.382685 0.923879 0;
+               vertex3 0.00120002 -0.0274 0.005;
+               normal3 0 -1 0;
+               texcoord2 0.3 0.5;
+               vertex3 -0.000999986 -0.026 0.021568;
+               normal3 0 1 0;
+               vertex3 0.00100001 -0.025 0.021568;
+               normal3 5.89261e-08 3.59376e-07 -1;
+               vertex3 1.47841e-08 -0.025 0.0218;
+               normal3 0 1 0;
+               vertex3 1.45435e-08 -0.025 0.0213;
+               normal3 -0.5 2.78885e-07 -0.866025;
+               vertex3 -0.000749986 -0.025 0.022001;
+               normal3 0 1 0;
+               vertex3 -0.000999986 -0.025 0.021568;
+               normal3 -0.866026 2.13262e-07 -0.5;
+               vertex3 -0.00129902 -0.025 0.02255;
+               normal3 0 1 0;
+               vertex3 -0.00173204 -0.025 0.0223;
+               normal3 -1 1.94026e-07 6.87471e-08;
+               vertex3 -0.00149999 -0.025 0.0233;
+               normal3 0 1 0;
+               vertex3 -0.00199999 -0.025 0.0233;
+               normal3 -0.866025 3.47691e-07 0.5;
+               vertex3 -0.00129902 -0.025 0.02405;
+               normal3 0 1 0;
+               vertex3 -0.00173204 -0.025 0.0243;
+               normal3 -0.499999 6.71753e-07 0.866026;
+               vertex3 -0.000749986 -0.025 0.024599;
+               normal3 0 1 0;
+               vertex3 -0.000999985 -0.025 0.0250321;
+               normal3 0 -1 0;
+               vertex3 1.45435e-08 -0.026 0.0213;
+               normal3 0 1 0;
+               vertex3 1.49564e-08 -0.025 0.0253;
+               vertex3 0.000750015 -0.025 0.024599;
+               vertex3 0.00100002 -0.025 0.0250321;
+               normal3 0 -1 0;
+               vertex3 0.00100001 -0.026 0.021568;
+               normal3 0.382685 0.923879 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.00120002 -0.0274 0.002;
+               normal3 -1.8788e-05 0.991445 -0.130524;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900019 -0.0277 0.022;
+               normal3 1 0 0;
+               vertex3 -0.000399989 -0.0267 0.0236;
+               normal3 0 -1 0;
+               vertex3 -0.000399989 -0.0267 0.0236;
+               normal3 0 0 -1;
+               vertex3 -0.000399989 -0.0267 0.023;
+               normal3 0 -1 0;
+               vertex3 -0.000399989 -0.0267 0.023;
+               normal3 0.382679 0.923881 0;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00119999 -0.0272 0.00500001;
+               normal3 -0.382684 0.923879 0;
+               vertex3 -0.00119999 -0.0272 0.00500001;
+               normal3 0.382679 0.923881 0;
+               vertex3 -0.000634302 -0.0274343 0.00500001;
+               normal3 0.92388 0.382683 0;
+               vertex3 -0.000634302 -0.0274343 0.00500001;
+               normal3 0.92388 -0.382683 0;
+               vertex3 -0.000399987 -0.028 0.00500001;
+               normal3 0.92388 0.382683 0;
+               vertex3 -0.000399987 -0.028 0.00500001;
+               normal3 0.382679 -0.923881 0;
+               vertex3 -0.000634302 -0.0285657 0.00500001;
+               normal3 0.92388 -0.382683 0;
+               vertex3 -0.000634302 -0.0285657 0.00500001;
+               normal3 0.382679 -0.923881 0;
+               vertex3 -0.00119999 -0.0288 0.00500001;
+               normal3 -0.382684 -0.923879 0;
+               vertex3 -0.00119999 -0.0288 0.00500001;
+               normal3 -0.923879 -0.382685 0;
+               vertex3 -0.00176567 -0.0285657 0.00500001;
+               normal3 -0.382684 -0.923879 0;
+               vertex3 -0.00176567 -0.0285657 0.00500001;
+               normal3 -0.923879 -0.382685 0;
+               vertex3 -0.00199999 -0.028 0.00500001;
+               normal3 -0.923879 0.382685 0;
+               vertex3 -0.00199999 -0.028 0.00500001;
+               normal3 -0.382684 0.923879 0;
+               vertex3 -0.00176567 -0.0274343 0.00500001;
+               normal3 -0.923879 0.382685 0;
+               vertex3 -0.00176567 -0.0274343 0.00500001;
+               normal3 -0.382684 0.923879 0;
+               vertex3 -0.00119999 -0.0272 0.00600001;
+               normal3 -1.67613e-05 -0.728827 0.684698;
+               vertex3 -0.00119999 -0.0272 0.00600001;
+               normal3 0.92388 0.382683 0;
+               vertex3 -0.000634302 -0.0274343 0.00600001;
+               normal3 -0.515343 -0.515345 0.68472;
+               vertex3 -0.000634302 -0.0274343 0.00600001;
+               normal3 0.92388 0.382683 0;
+               vertex3 -0.000399987 -0.028 0.00600001;
+               normal3 -0.728827 -1.87522e-05 0.684697;
+               vertex3 -0.000399987 -0.028 0.00600001;
+               normal3 0.92388 -0.382683 0;
+               vertex3 -0.000634302 -0.0285657 0.00600001;
+               normal3 -0.515359 0.515361 0.684696;
+               vertex3 -0.000634302 -0.0285657 0.00600001;
+               normal3 -0.382684 -0.923879 0;
+               vertex3 -0.00119999 -0.0288 0.00600001;
+               normal3 1.21596e-06 0.728851 0.684672;
+               vertex3 -0.00119999 -0.0288 0.00600001;
+               normal3 -0.382684 -0.923879 0;
+               vertex3 -0.00176567 -0.0285657 0.00600001;
+               normal3 0.515361 0.515361 0.684694;
+               vertex3 -0.00176567 -0.0285657 0.00600001;
+               normal3 -0.923879 0.382685 0;
+               vertex3 -0.00199999 -0.028 0.00600001;
+               normal3 0.728847 -8.34486e-07 0.684676;
+               vertex3 -0.00199999 -0.028 0.00600001;
+               normal3 -0.923879 0.382685 0;
+               vertex3 -0.00176567 -0.0274343 0.00600001;
+               normal3 0.51536 -0.51536 0.684696;
+               vertex3 -0.00176567 -0.0274343 0.00600001;
+               normal3 -2.54014e-05 -0.728827 0.684698;
+               vertex3 -0.00119999 -0.0275758 0.00560001;
+               normal3 -4.65783e-06 -1.12451e-05 1;
+               vertex3 -0.000900034 -0.0277001 0.00560001;
+               normal3 -1.12449e-05 -4.65777e-06 1;
+               vertex3 -0.000900034 -0.0277001 0.00560001;
+               normal3 1 3.70601e-05 -1.35586e-06;
+               texcoord2 0.5 0.5;
+               vertex3 -0.000900034 -0.0277001 0.00560001;
+               normal3 3.72546e-05 1 -1.36296e-06;
+               vertex3 -0.000900034 -0.0277001 0.00560001;
+               normal3 -1.12449e-05 -4.65777e-06 1;
+               texcoord2 0.7 0.5;
+               vertex3 -0.000775789 -0.028 0.00560001;
+               normal3 1.72965e-06 0.728851 0.684672;
+               vertex3 -0.00119999 -0.0284242 0.00560001;
+               normal3 0.728847 -1.30571e-06 0.684676;
+               vertex3 -0.00162419 -0.028 0.00560001;
+               normal3 -1 2.02146e-05 -7.39561e-07;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900019 -0.0283 0.022;
+               normal3 1 7.30538e-06 4.98646e-05;
+               texcoord2 0.3 0.5;
+               vertex3 0.00149996 -0.026 0.0245321;
+               normal3 0 -1 0;
+               vertex3 0.00149996 -0.026 0.0245321;
+               normal3 0.707106 0 0.707107;
+               vertex3 0.00149996 -0.025 0.0245321;
+               normal3 1 7.30538e-06 4.98646e-05;
+               vertex3 0.00149996 -0.025 0.0245321;
+               normal3 0.923879 -0.382685 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.00162428 -0.0284243 0.005;
+               normal3 0 0 -1;
+               vertex3 0.00162428 -0.0284243 0.005;
+               normal3 0.923879 0.382685 0;
+               vertex3 0.00180002 -0.028 0.002;
+               vertex3 0.00180002 -0.028 0.005;
+               normal3 0 0 -1;
+               vertex3 0.00180002 -0.028 0.005;
+               normal3 0.923879 0.382685 0;
+               vertex3 0.00162428 -0.0275757 0.002;
+               normal3 1 7.30469e-06 -4.98641e-05;
+               texcoord2 0.3 0.5;
+               vertex3 0.00149996 -0.026 0.0220679;
+               normal3 0 -1 0;
+               vertex3 0.00149996 -0.026 0.0220679;
+               normal3 0 1 0;
+               vertex3 0.00149996 -0.025 0.0220679;
+               normal3 1 7.30469e-06 -4.98641e-05;
+               vertex3 0.00149996 -0.025 0.0220679;
+               normal3 -0.92388 0.382682 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.000600017 -0.028 0.002;
+               vertex3 0.000600017 -0.028 0.005;
+               normal3 0 0 -1;
+               vertex3 0.000600017 -0.028 0.005;
+               normal3 0.923879 -0.382685 0;
+               vertex3 0.00162428 -0.0284243 0.002;
+               normal3 -0.92388 -0.382682 0;
+               vertex3 0.000775753 -0.0284243 0.002;
+               vertex3 0.000775753 -0.0284243 0.005;
+               normal3 0 0 -1;
+               vertex3 0.000775753 -0.0284243 0.005;
+               normal3 0.382685 -0.923879 0;
+               vertex3 0.00120002 -0.0286 0.002;
+               vertex3 0.00120002 -0.0286 0.005;
+               normal3 0 0 -1;
+               vertex3 0.00120002 -0.0286 0.005;
+               normal3 0.382685 0.923879 0;
+               vertex3 0.00162428 -0.0275757 0.005;
+               normal3 0.923879 0.382685 0;
+               vertex3 0.00162428 -0.0275757 0.005;
+               normal3 -1.8788e-05 0.991445 -0.130524;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 -0.0277 0.022;
+               normal3 0 -0.991445 0.130525;
+               vertex3 0.00150001 -0.0283 0.022;
+               normal3 0 2.24972e-05 1;
+               texcoord2 0.7 0.5;
+               vertex3 0.000900019 -0.0283 0.0056;
+               normal3 1.12449e-05 -4.65777e-06 1;
+               vertex3 0.000900019 -0.0283 0.0056;
+               normal3 -1 3.70601e-05 -1.35586e-06;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900019 -0.0283 0.0056;
+               normal3 0.515356 0.515363 0.684696;
+               texcoord2 0.7 0.5;
+               vertex3 0.000900019 -0.0283 0.0056;
+               normal3 4.65783e-06 -1.12451e-05 1;
+               vertex3 0.00150001 -0.0277 0.0056;
+               normal3 -2.24956e-05 0 1;
+               vertex3 0.00150001 -0.0277 0.0056;
+               normal3 -3.72546e-05 1 -1.36296e-06;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 -0.0277 0.0056;
+               normal3 -0.515359 -0.51536 0.684696;
+               texcoord2 0.7 0.5;
+               vertex3 0.00150001 -0.0277 0.0056;
+               normal3 1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 -0.0283 0.0056;
+               normal3 0 2.24972e-05 1;
+               texcoord2 0.7 0.5;
+               vertex3 0.00150001 -0.0283 0.0056;
+               normal3 -2.24956e-05 0 1;
+               vertex3 0.00150001 -0.0283 0.0056;
+               normal3 -0.515357 0.515364 0.684695;
+               vertex3 0.00150001 -0.0283 0.0056;
+               normal3 0 -0.866027 0.499997;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900019 -0.0280857 0.0228;
+               normal3 0 0.866029 -0.499994;
+               vertex3 0.000900019 -0.027566 0.0225;
+               vertex3 0.00150001 -0.027566 0.0225;
+               normal3 0 -0.866027 0.499997;
+               vertex3 0.00150001 -0.0280857 0.0228;
+               normal3 0 -0.500002 0.866024;
+               vertex3 0.000900019 -0.0275 0.0233857;
+               normal3 0 0.500005 -0.866022;
+               vertex3 0.000900019 -0.0272 0.022866;
+               vertex3 0.00150001 -0.0272 0.022866;
+               normal3 0 -0.500002 0.866024;
+               vertex3 0.00150001 -0.0275 0.0233857;
+               normal3 -1 0 0;
+               vertex3 0.000900019 -0.0267 0.0236;
+               normal3 0 -1 0;
+               vertex3 0.000900019 -0.0267 0.0236;
+               normal3 0 0.113359 -0.993554;
+               vertex3 0.000900019 -0.0267 0.023;
+               normal3 0 -1 0;
+               vertex3 0.000900019 -0.0267 0.023;
+               normal3 0 0.130528 -0.991445;
+               vertex3 0.00150001 -0.0267 0.023;
+               normal3 0 -0.130527 0.991445;
+               vertex3 0.00150001 -0.0267 0.0236;
+               normal3 -1 0 0;
+               vertex3 0.000400019 -0.026 0.0236;
+               normal3 0 -1 0;
+               texcoord2 0.3 0.5;
+               vertex3 0.000400019 -0.026 0.0236;
+               normal3 -1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 0.000400019 -0.026 0.023;
+               normal3 0 -1 0;
+               texcoord2 0.3 0.5;
+               vertex3 0.000400019 -0.026 0.023;
+               normal3 0 0 -1;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 -0.026 0.023;
+               normal3 0 -1 0;
+               texcoord2 0.3 0.5;
+               vertex3 0.00150001 -0.026 0.023;
+               normal3 0 0 1;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 -0.026 0.0236;
+               normal3 0 -1 0;
+               texcoord2 0.3 0.5;
+               vertex3 0.00150001 -0.026 0.0236;
+               normal3 -1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 0.000400019 -0.0267 0.0236;
+               normal3 0 -1 0;
+               vertex3 0.000400019 -0.0267 0.0236;
+               normal3 0 0 -1;
+               vertex3 0.000400019 -0.0267 0.023;
+               normal3 0 -1 0;
+               vertex3 0.000400019 -0.0267 0.023;
+               normal3 -0.382679 0.923881 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.00120002 -0.0272 0.005;
+               normal3 0.382684 0.923879 0;
+               vertex3 0.00120002 -0.0272 0.005;
+               normal3 -0.382679 0.923881 0;
+               vertex3 0.000634332 -0.0274343 0.005;
+               normal3 -0.92388 0.382683 0;
+               vertex3 0.000634332 -0.0274343 0.005;
+               normal3 -0.92388 -0.382683 0;
+               vertex3 0.000400017 -0.028 0.005;
+               normal3 -0.92388 0.382683 0;
+               vertex3 0.000400017 -0.028 0.005;
+               normal3 -0.382679 -0.923881 0;
+               vertex3 0.000634332 -0.0285657 0.005;
+               normal3 -0.92388 -0.382683 0;
+               vertex3 0.000634332 -0.0285657 0.005;
+               normal3 -0.382679 -0.923881 0;
+               vertex3 0.00120002 -0.0288 0.005;
+               normal3 0.382684 -0.923879 0;
+               vertex3 0.00120002 -0.0288 0.005;
+               normal3 0.923879 -0.382685 0;
+               vertex3 0.0017657 -0.0285657 0.005;
+               normal3 0.382684 -0.923879 0;
+               vertex3 0.0017657 -0.0285657 0.005;
+               normal3 0.923879 -0.382685 0;
+               vertex3 0.00200002 -0.028 0.005;
+               normal3 0.923879 0.382685 0;
+               vertex3 0.00200002 -0.028 0.005;
+               normal3 0.382684 0.923879 0;
+               vertex3 0.0017657 -0.0274343 0.005;
+               normal3 0.923879 0.382685 0;
+               vertex3 0.0017657 -0.0274343 0.005;
+               normal3 0.382684 0.923879 0;
+               vertex3 0.00120002 -0.0272 0.006;
+               normal3 1.67494e-05 -0.728827 0.684698;
+               vertex3 0.00120002 -0.0272 0.006;
+               normal3 -0.92388 0.382683 0;
+               vertex3 0.000634332 -0.0274343 0.006;
+               normal3 0.515343 -0.515345 0.68472;
+               vertex3 0.000634332 -0.0274343 0.006;
+               normal3 -0.92388 0.382683 0;
+               vertex3 0.000400017 -0.028 0.006;
+               normal3 0.728827 -1.87641e-05 0.684698;
+               vertex3 0.000400017 -0.028 0.006;
+               normal3 -0.92388 -0.382683 0;
+               vertex3 0.000634332 -0.0285657 0.006;
+               normal3 0.515359 0.51536 0.684696;
+               vertex3 0.000634332 -0.0285657 0.006;
+               normal3 0.382684 -0.923879 0;
+               vertex3 0.00120002 -0.0288 0.006;
+               normal3 -1.20404e-06 0.728851 0.684673;
+               vertex3 0.00120002 -0.0288 0.006;
+               normal3 0.382684 -0.923879 0;
+               vertex3 0.0017657 -0.0285657 0.006;
+               normal3 -0.515361 0.51536 0.684695;
+               vertex3 0.0017657 -0.0285657 0.006;
+               normal3 0.923879 0.382685 0;
+               vertex3 0.00200002 -0.028 0.006;
+               normal3 -0.728847 -8.46407e-07 0.684677;
+               vertex3 0.00200002 -0.028 0.006;
+               normal3 0.923879 0.382685 0;
+               vertex3 0.0017657 -0.0274343 0.006;
+               normal3 -0.515359 -0.515359 0.684696;
+               vertex3 0.0017657 -0.0274343 0.006;
+               normal3 2.53844e-05 -0.728827 0.684698;
+               vertex3 0.00120002 -0.0275758 0.00560001;
+               normal3 4.65783e-06 -1.12451e-05 1;
+               vertex3 0.000900064 -0.0277001 0.00560001;
+               normal3 1.12449e-05 -4.65777e-06 1;
+               vertex3 0.000900064 -0.0277001 0.00560001;
+               normal3 -1 3.70601e-05 -1.35586e-06;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900064 -0.0277001 0.00560001;
+               normal3 -3.72546e-05 1 -1.36296e-06;
+               vertex3 0.000900064 -0.0277001 0.00560001;
+               normal3 1.12449e-05 -4.65777e-06 1;
+               texcoord2 0.7 0.5;
+               vertex3 0.000775819 -0.028 0.00560001;
+               normal3 -1.7127e-06 0.728851 0.684673;
+               vertex3 0.00120002 -0.0284242 0.00560001;
+               normal3 -0.728847 -1.32267e-06 0.684677;
+               vertex3 0.00162421 -0.028 0.00560001;
+               normal3 1 -2.02146e-05 -7.39561e-07;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00089999 0.0283 0.022;
+               normal3 1.8788e-05 -0.991445 -0.130524;
+               vertex3 -0.00089999 0.0277 0.022;
+               normal3 -0.382685 -0.923879 0;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00119999 0.0274 0.002;
+               normal3 0 0 -1;
+               vertex3 -0.00119999 0.0274 0.005;
+               normal3 -0.382685 -0.923879 0;
+               vertex3 -0.00119999 0.0274 0.005;
+               normal3 0.92388 -0.382682 0;
+               vertex3 -0.000775723 0.0275757 0.002;
+               vertex3 -0.000775723 0.0275757 0.005;
+               normal3 0 0 -1;
+               vertex3 -0.000775723 0.0275757 0.005;
+               normal3 0.92388 0.382682 0;
+               vertex3 -0.000599987 0.028 0.002;
+               vertex3 -0.000599987 0.028 0.005;
+               normal3 0 0 -1;
+               vertex3 -0.000599987 0.028 0.005;
+               normal3 0.382678 0.923882 0;
+               vertex3 -0.000775723 0.0284243 0.002;
+               vertex3 -0.000775723 0.0284243 0.005;
+               normal3 0 0 -1;
+               vertex3 -0.000775723 0.0284243 0.005;
+               normal3 -0.382685 0.923879 0;
+               vertex3 -0.00119999 0.0286 0.002;
+               vertex3 -0.00119999 0.0286 0.005;
+               normal3 0 0 -1;
+               vertex3 -0.00119999 0.0286 0.005;
+               normal3 -0.923879 0.382685 0;
+               vertex3 -0.00162425 0.0284243 0.002;
+               vertex3 -0.00162425 0.0284243 0.005;
+               normal3 0 0 -1;
+               vertex3 -0.00162425 0.0284243 0.005;
+               normal3 -0.923879 -0.382685 0;
+               vertex3 -0.00179999 0.028 0.002;
+               vertex3 -0.00179999 0.028 0.005;
+               normal3 0 0 -1;
+               vertex3 -0.00179999 0.028 0.005;
+               normal3 -0.923879 -0.382685 0;
+               vertex3 -0.00162425 0.0275757 0.002;
+               normal3 -0.382685 -0.923879 0;
+               vertex3 -0.00162425 0.0275757 0.005;
+               normal3 -0.923879 -0.382685 0;
+               vertex3 -0.00162425 0.0275757 0.005;
+               normal3 1.8788e-05 -0.991445 -0.130524;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00149998 0.0277 0.022;
+               normal3 0 0.991445 0.130525;
+               vertex3 -0.00149998 0.0283 0.022;
+               normal3 0 -2.24972e-05 1;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00089999 0.0283 0.0056;
+               normal3 -1.12449e-05 4.65777e-06 1;
+               vertex3 -0.00089999 0.0283 0.0056;
+               normal3 1 -3.70601e-05 -1.35586e-06;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00089999 0.0283 0.0056;
+               normal3 -0.515356 -0.515363 0.684696;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00089999 0.0283 0.0056;
+               normal3 -4.65783e-06 1.12451e-05 1;
+               vertex3 -0.00149998 0.0277 0.0056;
+               normal3 2.24956e-05 0 1;
+               vertex3 -0.00149998 0.0277 0.0056;
+               normal3 3.72546e-05 -1 -1.36296e-06;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00149998 0.0277 0.0056;
+               normal3 0.515359 0.51536 0.684696;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00149998 0.0277 0.0056;
+               normal3 -1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00149998 0.0283 0.0056;
+               normal3 0 -2.24972e-05 1;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00149998 0.0283 0.0056;
+               normal3 2.24956e-05 0 1;
+               vertex3 -0.00149998 0.0283 0.0056;
+               normal3 0.515357 -0.515364 0.684695;
+               vertex3 -0.00149998 0.0283 0.0056;
+               normal3 0 0.866027 0.499997;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00089999 0.0280856 0.0228;
+               normal3 0 -0.866029 -0.499994;
+               vertex3 -0.00089999 0.027566 0.0225;
+               vertex3 -0.00149998 0.027566 0.0225;
+               normal3 0 0.866027 0.499997;
+               vertex3 -0.00149998 0.0280856 0.0228;
+               normal3 0 0.500002 0.866024;
+               vertex3 -0.00089999 0.0275 0.0233857;
+               normal3 0 -0.500005 -0.866022;
+               vertex3 -0.00089999 0.0272 0.022866;
+               vertex3 -0.00149998 0.0272 0.022866;
+               normal3 0 0.500002 0.866024;
+               vertex3 -0.00149998 0.0275 0.0233857;
+               normal3 1 0 0;
+               vertex3 -0.00089999 0.0267 0.0236;
+               normal3 0 1 0;
+               vertex3 -0.00089999 0.0267 0.0236;
+               normal3 0 -0.113359 -0.993554;
+               vertex3 -0.00089999 0.0267 0.023;
+               normal3 0 1 0;
+               vertex3 -0.00089999 0.0267 0.023;
+               normal3 0 -0.130528 -0.991445;
+               vertex3 -0.00149998 0.0267 0.023;
+               normal3 0 0.130527 0.991445;
+               vertex3 -0.00149998 0.0267 0.0236;
+               normal3 1 0 0;
+               vertex3 -0.000399989 0.026 0.0236;
+               normal3 0 1 0;
+               texcoord2 0.9 0.5;
+               vertex3 -0.000399989 0.026 0.0236;
+               normal3 1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 -0.000399989 0.026 0.023;
+               normal3 0 1 0;
+               texcoord2 0.9 0.5;
+               vertex3 -0.000399989 0.026 0.023;
+               normal3 0 0 -1;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00149998 0.026 0.023;
+               normal3 0 1 0;
+               texcoord2 0.9 0.5;
+               vertex3 -0.00149998 0.026 0.023;
+               normal3 0 0 1;
+               texcoord2 0.5 0.5;
+               vertex3 -0.00149998 0.026 0.0236;
+               normal3 0 1 0;
+               texcoord2 0.9 0.5;
+               vertex3 -0.00149998 0.026 0.0236;
+               normal3 0 -1 0;
+               vertex3 1.49012e-08 0.025 0.0248;
+               normal3 -0.382678 -0.923882 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.000775753 0.0275757 0.005;
+               normal3 0 0 -1;
+               vertex3 0.000775753 0.0275757 0.005;
+               normal3 0 1 0;
+               texcoord2 0.9 0.5;
+               vertex3 0.00100002 0.026 0.0250321;
+               vertex3 1.49564e-08 0.026 0.0253;
+               vertex3 -0.000999985 0.026 0.0250321;
+               vertex3 -0.00173204 0.026 0.0243;
+               normal3 0 -1 0;
+               vertex3 0.000750015 0.025 0.022001;
+               vertex3 0.00129905 0.025 0.02255;
+               normal3 1 -6.5223e-06 -1.37854e-10;
+               vertex3 0.00150001 0.025 0.0233;
+               normal3 0 -1 0;
+               vertex3 0.00150001 0.025 0.0233;
+               vertex3 0.00150001 0.025 0.0233;
+               vertex3 0.00129905 0.025 0.02405;
+               normal3 0 1 0;
+               vertex3 -0.00199999 0.026 0.0233;
+               normal3 -0.382678 -0.923882 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.000775753 0.0275757 0.002;
+               normal3 0 1 0;
+               texcoord2 0.9 0.5;
+               vertex3 -0.00173204 0.026 0.0223;
+               normal3 0 0 -1;
+               texcoord2 0.7 0.5;
+               vertex3 0.00120002 0.0274 0.005;
+               normal3 0.382685 -0.923879 0;
+               vertex3 0.00120002 0.0274 0.005;
+               normal3 0 1 0;
+               texcoord2 0.9 0.5;
+               vertex3 -0.000999986 0.026 0.021568;
+               normal3 0 -1 0;
+               vertex3 0.00100001 0.025 0.021568;
+               normal3 5.89261e-08 -3.59376e-07 -1;
+               vertex3 1.47841e-08 0.025 0.0218;
+               normal3 0 -1 0;
+               vertex3 1.45435e-08 0.025 0.0213;
+               normal3 -0.5 -2.78885e-07 -0.866025;
+               vertex3 -0.000749986 0.025 0.022001;
+               normal3 0 -1 0;
+               vertex3 -0.000999986 0.025 0.021568;
+               normal3 -0.866026 -2.13262e-07 -0.5;
+               vertex3 -0.00129902 0.025 0.02255;
+               normal3 0 -1 0;
+               vertex3 -0.00173204 0.025 0.0223;
+               normal3 -1 -1.94026e-07 6.87471e-08;
+               vertex3 -0.00149999 0.025 0.0233;
+               normal3 0 -1 0;
+               vertex3 -0.00199999 0.025 0.0233;
+               normal3 -0.866025 -3.47691e-07 0.5;
+               vertex3 -0.00129902 0.025 0.02405;
+               normal3 0 -1 0;
+               vertex3 -0.00173204 0.025 0.0243;
+               normal3 -0.499999 -6.71753e-07 0.866026;
+               vertex3 -0.000749986 0.025 0.024599;
+               normal3 0 -1 0;
+               vertex3 -0.000999985 0.025 0.0250321;
+               normal3 0 1 0;
+               vertex3 1.45435e-08 0.026 0.0213;
+               normal3 0 -1 0;
+               vertex3 1.49564e-08 0.025 0.0253;
+               vertex3 0.000750015 0.025 0.024599;
+               vertex3 0.00100002 0.025 0.0250321;
+               normal3 0 1 0;
+               vertex3 0.00100001 0.026 0.021568;
+               normal3 0.382685 -0.923879 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.00120002 0.0274 0.002;
+               normal3 -1.8788e-05 -0.991445 -0.130524;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900019 0.0277 0.022;
+               normal3 1 0 0;
+               vertex3 -0.000399989 0.0267 0.0236;
+               normal3 0 1 0;
+               vertex3 -0.000399989 0.0267 0.0236;
+               normal3 0 0 -1;
+               vertex3 -0.000399989 0.0267 0.023;
+               normal3 0 1 0;
+               vertex3 -0.000399989 0.0267 0.023;
+               normal3 0.382679 -0.923881 0;
+               texcoord2 0.7 0.5;
+               vertex3 -0.00119999 0.0272 0.005;
+               normal3 -0.382684 -0.923879 0;
+               vertex3 -0.00119999 0.0272 0.005;
+               normal3 0.382679 -0.923881 0;
+               vertex3 -0.000634302 0.0274343 0.005;
+               normal3 0.92388 -0.382683 0;
+               vertex3 -0.000634302 0.0274343 0.005;
+               normal3 0.92388 0.382683 0;
+               vertex3 -0.000399987 0.028 0.005;
+               normal3 0.92388 -0.382683 0;
+               vertex3 -0.000399987 0.028 0.005;
+               normal3 0.382679 0.923881 0;
+               vertex3 -0.000634302 0.0285657 0.005;
+               normal3 0.92388 0.382683 0;
+               vertex3 -0.000634302 0.0285657 0.005;
+               normal3 0.382679 0.923881 0;
+               vertex3 -0.00119999 0.0288 0.005;
+               normal3 -0.382684 0.923879 0;
+               vertex3 -0.00119999 0.0288 0.005;
+               normal3 -0.923879 0.382685 0;
+               vertex3 -0.00176567 0.0285657 0.005;
+               normal3 -0.382684 0.923879 0;
+               vertex3 -0.00176567 0.0285657 0.005;
+               normal3 -0.923879 0.382685 0;
+               vertex3 -0.00199999 0.028 0.005;
+               normal3 -0.923879 -0.382685 0;
+               vertex3 -0.00199999 0.028 0.005;
+               normal3 -0.382684 -0.923879 0;
+               vertex3 -0.00176567 0.0274343 0.005;
+               normal3 -0.923879 -0.382685 0;
+               vertex3 -0.00176567 0.0274343 0.005;
+               normal3 -0.382684 -0.923879 0;
+               vertex3 -0.00119999 0.0272 0.006;
+               normal3 -1.67494e-05 0.728827 0.684698;
+               vertex3 -0.00119999 0.0272 0.006;
+               normal3 0.92388 -0.382683 0;
+               vertex3 -0.000634302 0.0274343 0.006;
+               normal3 -0.515343 0.515345 0.68472;
+               vertex3 -0.000634302 0.0274343 0.006;
+               normal3 0.92388 -0.382683 0;
+               vertex3 -0.000399987 0.028 0.006;
+               normal3 -0.728827 1.87641e-05 0.684698;
+               vertex3 -0.000399987 0.028 0.006;
+               normal3 0.92388 0.382683 0;
+               vertex3 -0.000634302 0.0285657 0.006;
+               normal3 -0.515359 -0.51536 0.684696;
+               vertex3 -0.000634302 0.0285657 0.006;
+               normal3 -0.382684 0.923879 0;
+               vertex3 -0.00119999 0.0288 0.006;
+               normal3 1.20404e-06 -0.728851 0.684673;
+               vertex3 -0.00119999 0.0288 0.006;
+               normal3 -0.382684 0.923879 0;
+               vertex3 -0.00176567 0.0285657 0.006;
+               normal3 0.515361 -0.51536 0.684695;
+               vertex3 -0.00176567 0.0285657 0.006;
+               normal3 -0.923879 -0.382685 0;
+               vertex3 -0.00199999 0.028 0.006;
+               normal3 0.728847 8.46407e-07 0.684677;
+               vertex3 -0.00199999 0.028 0.006;
+               normal3 -0.923879 -0.382685 0;
+               vertex3 -0.00176567 0.0274343 0.006;
+               normal3 0.515359 0.515359 0.684696;
+               vertex3 -0.00176567 0.0274343 0.006;
+               normal3 -2.53844e-05 0.728827 0.684698;
+               vertex3 -0.00119999 0.0275758 0.00560001;
+               normal3 -4.65783e-06 1.12451e-05 1;
+               vertex3 -0.000900034 0.0277 0.00560001;
+               normal3 -1.12449e-05 4.65777e-06 1;
+               vertex3 -0.000900034 0.0277 0.00560001;
+               normal3 1 -3.70601e-05 -1.35586e-06;
+               texcoord2 0.5 0.5;
+               vertex3 -0.000900034 0.0277 0.00560001;
+               normal3 3.72546e-05 -1 -1.36296e-06;
+               vertex3 -0.000900034 0.0277 0.00560001;
+               normal3 -1.12449e-05 4.65777e-06 1;
+               texcoord2 0.7 0.5;
+               vertex3 -0.000775789 0.028 0.00560001;
+               normal3 1.7127e-06 -0.728851 0.684673;
+               vertex3 -0.00119999 0.0284242 0.00560001;
+               normal3 0.728847 1.32267e-06 0.684677;
+               vertex3 -0.00162419 0.028 0.00560001;
+               normal3 -1 -2.02146e-05 -7.39561e-07;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900019 0.0283 0.022;
+               normal3 1 -7.30538e-06 4.98646e-05;
+               texcoord2 0.9 0.5;
+               vertex3 0.00149996 0.026 0.0245321;
+               normal3 0 1 0;
+               vertex3 0.00149996 0.026 0.0245321;
+               normal3 0.707106 0 0.707107;
+               vertex3 0.00149996 0.025 0.0245321;
+               normal3 1 -7.30538e-06 4.98646e-05;
+               vertex3 0.00149996 0.025 0.0245321;
+               normal3 0.923879 0.382685 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.00162428 0.0284243 0.005;
+               normal3 0 0 -1;
+               vertex3 0.00162428 0.0284243 0.005;
+               normal3 0.923879 -0.382685 0;
+               vertex3 0.00180002 0.028 0.002;
+               vertex3 0.00180002 0.028 0.005;
+               normal3 0 0 -1;
+               vertex3 0.00180002 0.028 0.005;
+               normal3 0.923879 -0.382685 0;
+               vertex3 0.00162428 0.0275757 0.002;
+               normal3 1 -7.30469e-06 -4.98641e-05;
+               texcoord2 0.9 0.5;
+               vertex3 0.00149996 0.026 0.0220679;
+               normal3 0 1 0;
+               vertex3 0.00149996 0.026 0.0220679;
+               normal3 0 -1 0;
+               vertex3 0.00149996 0.025 0.0220679;
+               normal3 1 -7.30469e-06 -4.98641e-05;
+               vertex3 0.00149996 0.025 0.0220679;
+               normal3 -0.92388 -0.382682 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.000600017 0.028 0.002;
+               vertex3 0.000600017 0.028 0.005;
+               normal3 0 0 -1;
+               vertex3 0.000600017 0.028 0.005;
+               normal3 0.923879 0.382685 0;
+               vertex3 0.00162428 0.0284243 0.002;
+               normal3 -0.92388 0.382682 0;
+               vertex3 0.000775753 0.0284243 0.002;
+               vertex3 0.000775753 0.0284243 0.005;
+               normal3 0 0 -1;
+               vertex3 0.000775753 0.0284243 0.005;
+               normal3 0.382685 0.923879 0;
+               vertex3 0.00120002 0.0286 0.002;
+               vertex3 0.00120002 0.0286 0.005;
+               normal3 0 0 -1;
+               vertex3 0.00120002 0.0286 0.005;
+               normal3 0.382685 -0.923879 0;
+               vertex3 0.00162428 0.0275757 0.005;
+               normal3 0.923879 -0.382685 0;
+               vertex3 0.00162428 0.0275757 0.005;
+               normal3 -1.8788e-05 -0.991445 -0.130524;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 0.0277 0.022;
+               normal3 0 0.991445 0.130525;
+               vertex3 0.00150001 0.0283 0.022;
+               normal3 0 -2.24972e-05 1;
+               texcoord2 0.7 0.5;
+               vertex3 0.000900019 0.0283 0.0056;
+               normal3 1.12449e-05 4.65777e-06 1;
+               vertex3 0.000900019 0.0283 0.0056;
+               normal3 -1 -3.70601e-05 -1.35586e-06;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900019 0.0283 0.0056;
+               normal3 0.515356 -0.515363 0.684696;
+               texcoord2 0.7 0.5;
+               vertex3 0.000900019 0.0283 0.0056;
+               normal3 4.65783e-06 1.12451e-05 1;
+               vertex3 0.00150001 0.0277 0.0056;
+               normal3 -2.24956e-05 0 1;
+               vertex3 0.00150001 0.0277 0.0056;
+               normal3 -3.72546e-05 -1 -1.36296e-06;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 0.0277 0.0056;
+               normal3 -0.515359 0.51536 0.684696;
+               texcoord2 0.7 0.5;
+               vertex3 0.00150001 0.0277 0.0056;
+               normal3 1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 0.0283 0.0056;
+               normal3 0 -2.24972e-05 1;
+               texcoord2 0.7 0.5;
+               vertex3 0.00150001 0.0283 0.0056;
+               normal3 -2.24956e-05 0 1;
+               vertex3 0.00150001 0.0283 0.0056;
+               normal3 -0.515357 -0.515364 0.684695;
+               vertex3 0.00150001 0.0283 0.0056;
+               normal3 0 0.866027 0.499997;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900019 0.0280856 0.0228;
+               normal3 0 -0.866029 -0.499994;
+               vertex3 0.000900019 0.027566 0.0225;
+               vertex3 0.00150001 0.027566 0.0225;
+               normal3 0 0.866027 0.499997;
+               vertex3 0.00150001 0.0280856 0.0228;
+               normal3 0 0.500002 0.866024;
+               vertex3 0.000900019 0.0275 0.0233857;
+               normal3 0 -0.500005 -0.866022;
+               vertex3 0.000900019 0.0272 0.022866;
+               vertex3 0.00150001 0.0272 0.022866;
+               normal3 0 0.500002 0.866024;
+               vertex3 0.00150001 0.0275 0.0233857;
+               normal3 -1 0 0;
+               vertex3 0.000900019 0.0267 0.0236;
+               normal3 0 1 0;
+               vertex3 0.000900019 0.0267 0.0236;
+               normal3 0 -0.113359 -0.993554;
+               vertex3 0.000900019 0.0267 0.023;
+               normal3 0 1 0;
+               vertex3 0.000900019 0.0267 0.023;
+               normal3 0 -0.130528 -0.991445;
+               vertex3 0.00150001 0.0267 0.023;
+               normal3 0 0.130527 0.991445;
+               vertex3 0.00150001 0.0267 0.0236;
+               normal3 -1 0 0;
+               vertex3 0.000400019 0.026 0.0236;
+               normal3 0 1 0;
+               texcoord2 0.9 0.5;
+               vertex3 0.000400019 0.026 0.0236;
+               normal3 -1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 0.000400019 0.026 0.023;
+               normal3 0 1 0;
+               texcoord2 0.9 0.5;
+               vertex3 0.000400019 0.026 0.023;
+               normal3 0 0 -1;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 0.026 0.023;
+               normal3 0 1 0;
+               texcoord2 0.9 0.5;
+               vertex3 0.00150001 0.026 0.023;
+               normal3 0 0 1;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 0.026 0.0236;
+               normal3 0 1 0;
+               texcoord2 0.9 0.5;
+               vertex3 0.00150001 0.026 0.0236;
+               normal3 -1 0 0;
+               texcoord2 0.5 0.5;
+               vertex3 0.000400019 0.0267 0.0236;
+               normal3 0 1 0;
+               vertex3 0.000400019 0.0267 0.0236;
+               normal3 0 0 -1;
+               vertex3 0.000400019 0.0267 0.023;
+               normal3 0 1 0;
+               vertex3 0.000400019 0.0267 0.023;
+               normal3 -0.382679 -0.923881 0;
+               texcoord2 0.7 0.5;
+               vertex3 0.00120002 0.0272 0.005;
+               normal3 0.382684 -0.923879 0;
+               vertex3 0.00120002 0.0272 0.005;
+               normal3 -0.382679 -0.923881 0;
+               vertex3 0.000634332 0.0274343 0.005;
+               normal3 -0.92388 -0.382683 0;
+               vertex3 0.000634332 0.0274343 0.005;
+               normal3 -0.92388 0.382683 0;
+               vertex3 0.000400017 0.028 0.005;
+               normal3 -0.92388 -0.382683 0;
+               vertex3 0.000400017 0.028 0.005;
+               normal3 -0.382679 0.923881 0;
+               vertex3 0.000634332 0.0285657 0.005;
+               normal3 -0.92388 0.382683 0;
+               vertex3 0.000634332 0.0285657 0.005;
+               normal3 -0.382679 0.923881 0;
+               vertex3 0.00120002 0.0288 0.005;
+               normal3 0.382684 0.923879 0;
+               vertex3 0.00120002 0.0288 0.005;
+               normal3 0.923879 0.382685 0;
+               vertex3 0.0017657 0.0285657 0.005;
+               normal3 0.382684 0.923879 0;
+               vertex3 0.0017657 0.0285657 0.005;
+               normal3 0.923879 0.382685 0;
+               vertex3 0.00200002 0.028 0.005;
+               normal3 0.923879 -0.382685 0;
+               vertex3 0.00200002 0.028 0.005;
+               normal3 0.382684 -0.923879 0;
+               vertex3 0.0017657 0.0274343 0.005;
+               normal3 0.923879 -0.382685 0;
+               vertex3 0.0017657 0.0274343 0.005;
+               normal3 0.382684 -0.923879 0;
+               vertex3 0.00120002 0.0272 0.006;
+               normal3 1.67494e-05 0.728827 0.684698;
+               vertex3 0.00120002 0.0272 0.006;
+               normal3 -0.92388 -0.382683 0;
+               vertex3 0.000634332 0.0274343 0.006;
+               normal3 0.515343 0.515345 0.68472;
+               vertex3 0.000634332 0.0274343 0.006;
+               normal3 -0.92388 -0.382683 0;
+               vertex3 0.000400017 0.028 0.006;
+               normal3 0.728827 1.87641e-05 0.684698;
+               vertex3 0.000400017 0.028 0.006;
+               normal3 -0.92388 0.382683 0;
+               vertex3 0.000634332 0.0285657 0.006;
+               normal3 0.515359 -0.51536 0.684696;
+               vertex3 0.000634332 0.0285657 0.006;
+               normal3 0.382684 0.923879 0;
+               vertex3 0.00120002 0.0288 0.006;
+               normal3 -1.20404e-06 -0.728851 0.684673;
+               vertex3 0.00120002 0.0288 0.006;
+               normal3 0.382684 0.923879 0;
+               vertex3 0.0017657 0.0285657 0.006;
+               normal3 -0.515361 -0.51536 0.684695;
+               vertex3 0.0017657 0.0285657 0.006;
+               normal3 0.923879 -0.382685 0;
+               vertex3 0.00200002 0.028 0.006;
+               normal3 -0.728847 8.46407e-07 0.684677;
+               vertex3 0.00200002 0.028 0.006;
+               normal3 0.923879 -0.382685 0;
+               vertex3 0.0017657 0.0274343 0.006;
+               normal3 -0.515359 0.515359 0.684696;
+               vertex3 0.0017657 0.0274343 0.006;
+               normal3 2.53844e-05 0.728827 0.684698;
+               vertex3 0.00120002 0.0275758 0.00560001;
+               normal3 4.65783e-06 1.12451e-05 1;
+               vertex3 0.000900064 0.0277 0.00560001;
+               normal3 1.12449e-05 4.65777e-06 1;
+               vertex3 0.000900064 0.0277 0.00560001;
+               normal3 -1 -3.70601e-05 -1.35586e-06;
+               texcoord2 0.5 0.5;
+               vertex3 0.000900064 0.0277 0.00560001;
+               normal3 -3.72546e-05 -1 -1.36296e-06;
+               vertex3 0.000900064 0.0277 0.00560001;
+               normal3 1.12449e-05 4.65777e-06 1;
+               texcoord2 0.7 0.5;
+               vertex3 0.000775819 0.028 0.00560001;
+               normal3 -1.7127e-06 -0.728851 0.684673;
+               vertex3 0.00120002 0.0284242 0.00560001;
+               normal3 -0.728847 1.32267e-06 0.684677;
+               vertex3 0.00162421 0.028 0.00560001;
+               normal3 1 3.28521e-06 -2.28003e-05;
+               texcoord2 0.5 0.5;
+               vertex3 0.00150001 -0.026 0.023;
+               normal3 1 3.28555e-06 2.28007e-05;
+               vertex3 0.00150001 -0.026 0.0236;
+               normal3 1 -3.28521e-06 -2.28003e-05;
+               vertex3 0.00150001 0.026 0.023;
+               normal3 1 -3.28555e-06 2.28007e-05;
+               vertex3 0.00150001 0.026 0.0236;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 29 450 26 27 33 34 37 38 41 42 45 46;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 121 417 128 25 127 436 126 433 125 430 124 427 123 424 122 421 121 417;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 30 28 441 8 457 454 461 458 467 39 474 43;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 444 554 414 9 31 32 35 36 462 40;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 555 448 415 440 455 456 459 460 464 466 44 472;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 150 149 99 116 101 112 103 98 105 96 107 57 109 52 111 51 113 50 115 49 562 143;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 66 65 69 64 68 94 67 47 114;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 72 69 71 68 70 67 56 114;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 65 93 64 92 94 91 47 506;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 70 56 73 55 76 54 63 53 62 496 61 498 60 500 59 502 58 504 91 506;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 71 70 74 73 77 76 79 63 81 62 83 61 85 60 87 59 89 58 92 91;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 72 71 75 74 78 77 80 79 82 81 84 83 86 85 88 87 90 89 93 92;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 69 72 66 75 78;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 78 80 66 82 84;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 84 86 66 88 90;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 90 93 66 65;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 499 102 497 100 495 483 572 484 487;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 102 499 104 501 106 503 108 505 110 507 476 509 510 511 488 144 486;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 570 573 178 485 179 563 560;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 139 540 138 538 551 536 449 550 558 548 453 546 557 544 445 542 139 540;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 596 162 160 159 167 166 171 170 175 174 919 918;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 189 158 182 492 183 478 184 576 185 580 186 583 187 565 188 568 189 158;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 161 163 142 587 600 603 604 607 172 613 176 620;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 661 590 118 559 165 164 169 168 173 608;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 594 662 586 514 602 601 606 605 612 610 618 177;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 199 645 200 647 591 649 664 651 599 653 665 655 595 657 658 643 199 645;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 615 469 617 471 508 494;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 615 480 469 481 475 482 489;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 480 615 479 621 561;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 475 489 473 491 494;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 508 512 617 619;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 702 224 222 221 229 228 233 232 237 236 241 240;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 323 220 316 669 317 673 318 676 319 679 320 682 321 685 322 688 323 220;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 223 225 203 693 706 709 710 713 234 719 238 726;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 806 696 204 666 227 226 231 230 235 714;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 700 807 692 667 708 707 712 711 718 716 724 239;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 344 345 311 294 307 296 293 298 291 300 252 302 247 304 246 306 245 308 244 310 338 814;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 264 260 261 288 285 287 284 286 253 758 756;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 287 288 259 260 263 264 266 267 269 270 272 273 274 275 276 277 278 279 280 281 282 283 284 285;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 263 262 259 289 287 286;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 262 263 265 266 268 269 271 272 258 274 257 276 256 278 255 280 254 282 253 284;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 309 262 251 265 250 268 249 271 248 258 748 257 750 256 752 255 754 254 756 253;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 264 261 267 270;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 270 261 273 275;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 275 261 277 279;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 279 261 281 283;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 749 295 751 297 753 299 755 301 757 303 759 305 761 728 763 762 339 740 738;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 295 749 735 747 736 824 739;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 262 309 289 242 286 758;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 812 815 374 737 373 825 822;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 333 790 334 792 697 794 809 796 705 798 810 800 701 802 803 788 333 790;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 357 848 354 355 361 362 365 366 369 370 920 921;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 377 744 384 353 383 820 382 817 381 835 380 832 379 828 378 730 377 744;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 358 356 839 337 855 852 859 856 865 367 872 371;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 842 913 811 313 359 360 363 364 860 368;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 914 846 766 838 853 854 857 858 862 864 372 870;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 395 899 394 897 910 895 847 909 917 907 851 905 916 903 843 901 395 899;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 869 723 867 721 732 733;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 869 760 723 746 725 743 741;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 732 731 867 873;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 725 741 727 734 733;
+       };
+       batch TRIANGLE_STRIP
+       {
+               indices 760 869 764 871 823;
+       };
+       batch TRIANGLES
+       {
+               indices 4 5 1;
+               indices 4 1 0;
+               indices 408 6 2;
+               indices 408 2 400;
+               indices 410 7 3;
+               indices 410 3 402;
+               indices 412 406 398;
+               indices 412 398 404;
+               indices 399 401 403;
+               indices 399 403 405;
+               indices 413 411 409;
+               indices 413 409 407;
+               indices 10 11 13;
+               indices 10 13 12;
+               indices 419 420 15;
+               indices 419 15 14;
+               indices 422 423 17;
+               indices 422 17 16;
+               indices 425 426 19;
+               indices 425 19 18;
+               indices 428 429 21;
+               indices 428 21 20;
+               indices 431 432 23;
+               indices 431 23 22;
+               indices 24 438 418;
+               indices 24 418 416;
+               indices 434 435 439;
+               indices 434 439 437;
+               indices 119 43 39;
+               indices 154 156 157;
+               indices 154 157 155;
+               indices 151 578 579;
+               indices 151 579 152;
+               indices 95 574 575;
+               indices 95 575 48;
+               indices 117 490 477;
+               indices 117 477 97;
+               indices 470 468 515;
+               indices 470 515 120;
+               indices 464 44 517;
+               indices 518 516 463;
+               indices 518 463 465;
+               indices 527 525 132;
+               indices 527 132 133;
+               indices 531 529 134;
+               indices 531 134 135;
+               indices 521 519 129;
+               indices 521 129 130;
+               indices 520 533 136;
+               indices 520 136 535;
+               indices 526 523 131;
+               indices 526 131 541;
+               indices 530 528 543;
+               indices 530 543 545;
+               indices 534 532 547;
+               indices 534 547 549;
+               indices 524 522 537;
+               indices 524 537 539;
+               indices 446 552 137;
+               indices 451 140 442;
+               indices 443 556 553;
+               indices 447 141 452;
+               indices 581 153 145;
+               indices 581 145 582;
+               indices 577 146 147;
+               indices 577 147 564;
+               indices 148 513 493;
+               indices 148 493 584;
+               indices 566 569 585;
+               indices 566 585 567;
+               indices 180 172 176;
+               indices 616 181 622;
+               indices 616 622 614;
+               indices 610 624 177;
+               indices 625 611 609;
+               indices 625 609 623;
+               indices 634 194 193;
+               indices 634 193 632;
+               indices 638 196 195;
+               indices 638 195 636;
+               indices 628 191 190;
+               indices 628 190 626;
+               indices 627 642 197;
+               indices 627 197 640;
+               indices 633 648 192;
+               indices 633 192 630;
+               indices 637 652 650;
+               indices 637 650 635;
+               indices 641 656 654;
+               indices 641 654 639;
+               indices 631 646 644;
+               indices 631 644 629;
+               indices 592 198 659;
+               indices 597 588 201;
+               indices 589 660 663;
+               indices 593 598 202;
+               indices 571 619 512;
+               indices 473 494 471;
+               indices 205 207 208;
+               indices 205 208 206;
+               indices 671 209 210;
+               indices 671 210 672;
+               indices 674 211 212;
+               indices 674 212 675;
+               indices 677 213 214;
+               indices 677 214 678;
+               indices 680 215 216;
+               indices 680 216 681;
+               indices 683 217 218;
+               indices 683 218 684;
+               indices 219 668 670;
+               indices 219 670 690;
+               indices 686 689 691;
+               indices 686 691 687;
+               indices 314 234 238;
+               indices 283 261 285;
+               indices 349 350 352;
+               indices 349 352 351;
+               indices 346 347 831;
+               indices 346 831 830;
+               indices 290 243 827;
+               indices 290 827 826;
+               indices 312 292 729;
+               indices 312 729 742;
+               indices 722 315 767;
+               indices 722 767 720;
+               indices 716 769 239;
+               indices 770 717 715;
+               indices 770 715 768;
+               indices 779 328 327;
+               indices 779 327 777;
+               indices 783 330 329;
+               indices 783 329 781;
+               indices 773 325 324;
+               indices 773 324 771;
+               indices 772 787 331;
+               indices 772 331 785;
+               indices 778 793 326;
+               indices 778 326 775;
+               indices 782 797 795;
+               indices 782 795 780;
+               indices 786 801 799;
+               indices 786 799 784;
+               indices 776 791 789;
+               indices 776 789 774;
+               indices 698 332 804;
+               indices 703 694 335;
+               indices 695 805 808;
+               indices 699 704 336;
+               indices 833 834 340;
+               indices 833 340 348;
+               indices 829 816 342;
+               indices 829 342 341;
+               indices 343 836 745;
+               indices 343 745 765;
+               indices 818 819 837;
+               indices 818 837 821;
+               indices 375 371 367;
+               indices 868 866 874;
+               indices 868 874 376;
+               indices 862 372 876;
+               indices 877 875 861;
+               indices 877 861 863;
+               indices 886 884 388;
+               indices 886 388 389;
+               indices 890 888 390;
+               indices 890 390 391;
+               indices 880 878 385;
+               indices 880 385 386;
+               indices 879 892 392;
+               indices 879 392 894;
+               indices 885 882 387;
+               indices 885 387 900;
+               indices 889 887 902;
+               indices 889 902 904;
+               indices 893 891 906;
+               indices 893 906 908;
+               indices 883 881 896;
+               indices 883 896 898;
+               indices 844 911 393;
+               indices 849 396 840;
+               indices 841 915 912;
+               indices 845 397 850;
+               indices 813 873 731;
+               indices 727 733 721;
+       };
+};
+technique
+{
+       pass ""
+       {
+               material
+               {
+                       diffuse 1 1 1 1;
+               };
+               texunit 0
+               {
+                       texture2d
+                       {
+                               min_filter NEAREST;
+                               mag_filter NEAREST;
+                               storage RGB 5 1;
+                               raw_data "\xD8\xCC\x7F\xE5\xE5\xE5\xCC\xCC\xCC\x33\x33\x33\x00\x00\x00";
+                       };
+               };
+       };
+};
index 6d0c20c3b797508e97b189dfb3ee8d1cab108fb1..f938d395dd793d3c35660a2bfce4bf736c5a10b9 100644 (file)
Binary files a/gfx.blend and b/gfx.blend differ
diff --git a/source/3d/beamgate.cpp b/source/3d/beamgate.cpp
new file mode 100644 (file)
index 0000000..a2024b9
--- /dev/null
@@ -0,0 +1,32 @@
+#include <msp/gl/object.h>
+#include <msp/gl/renderer.h>
+#include "beamgate.h"
+#include "layout.h"
+
+using namespace Msp;
+
+namespace R2C2 {
+
+BeamGate3D::BeamGate3D(Layout3D &l, BeamGate &g):
+       Object3D(l, g),
+       GL::ObjectInstance(layout.get_catalogue().get<GL::Object>("beamgate.object"))
+{
+       layout.get_scene().add(*this);
+}
+
+BeamGate3D::~BeamGate3D()
+{
+       layout.get_scene().remove(*this);
+}
+
+Vector BeamGate3D::get_node() const
+{
+       return matrix*Vector(0, 0, 0.04);
+}
+
+void BeamGate3D::setup_render(GL::Renderer &renderer, const GL::Tag &) const
+{
+       renderer.matrix_stack() *= matrix;
+}
+
+} // namespace R2C2
diff --git a/source/3d/beamgate.h b/source/3d/beamgate.h
new file mode 100644 (file)
index 0000000..f243db5
--- /dev/null
@@ -0,0 +1,24 @@
+#ifndef R2C2_3D_BEAMGATE_H_
+#define R2C2_3D_BEAMGATE_H_
+
+#include <msp/gl/objectinstance.h>
+#include "libr2c2/beamgate.h"
+#include "object.h"
+
+namespace R2C2 {
+
+class BeamGate3D: public Object3D, public Msp::GL::ObjectInstance
+{
+public:
+       BeamGate3D(Layout3D &, BeamGate &);
+       ~BeamGate3D();
+
+       virtual Vector get_node() const;
+       virtual bool is_visible() const { return true; }
+
+       virtual void setup_render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
+};
+
+} // namespace R2C2
+
+#endif
index db419d3639065c2e76a574702ebfe062085b6eae..1bbbed825bb68f493547046fa8051a60fbdb8b1b 100644 (file)
@@ -1,3 +1,4 @@
+#include "beamgate.h"
 #include "layout.h"
 #include "signal.h"
 #include "track.h"
@@ -64,6 +65,8 @@ void Layout3D::object_added(Object &o)
                new Signal3D(*this, *s);
        else if(Vehicle *v = dynamic_cast<Vehicle *>(&o))
                new Vehicle3D(*this, *v);
+       else if(BeamGate *g = dynamic_cast<BeamGate *>(&o))
+               new BeamGate3D(*this, *g);
 }
 
 void Layout3D::object_removed(Object &o)
diff --git a/source/libr2c2/beamgate.cpp b/source/libr2c2/beamgate.cpp
new file mode 100644 (file)
index 0000000..550c97c
--- /dev/null
@@ -0,0 +1,108 @@
+#include "beamgate.h"
+#include "catalogue.h"
+#include "layout.h"
+
+using namespace std;
+using namespace Msp;
+
+namespace R2C2 {
+
+BeamGate::BeamGate(Layout &l):
+       TrackAttachment(l),
+       Sensor(l)
+{
+       invert = true;
+
+       layout.add(*this);
+}
+
+BeamGate::~BeamGate()
+{
+       layout.remove(*this);
+}
+
+BeamGate *BeamGate::clone(Layout *to_layout) const
+{
+       BeamGate *gate = new BeamGate(to_layout ? *to_layout : layout);
+       gate->set_position(position);
+       gate->set_rotation(rotation);
+       return gate;
+}
+
+const BeamGateType &BeamGate::get_type() const
+{
+       return BeamGateType::instance();
+}
+
+void BeamGate::set_address(unsigned a)
+{
+       address = a;
+}
+
+void BeamGate::set_position(const Vector &p)
+{
+       position = p;
+       update_attachment();
+       signal_moved.emit();
+}
+
+void BeamGate::set_rotation(const Angle &r)
+{
+       rotation = r;
+       update_attachment();
+       signal_moved.emit();
+}
+
+void BeamGate::update_attachment()
+{
+       attach_to_closest(100*layout.get_catalogue().get_gauge());
+
+       if(track)
+       {
+               TrackPoint tp = track->get_point(track.entry(), offset);
+               position = tp.pos;
+               rotation = tp.dir;
+       }
+}
+
+Block *BeamGate::get_block() const
+{
+       if(track)
+               return &track->get_block();
+       else
+               return 0;
+}
+
+void BeamGate::save(list<DataFile::Statement> &st) const
+{
+       st.push_back((DataFile::Statement("position"), position.x, position.y, position.z));
+       st.push_back((DataFile::Statement("rotation"), rotation.radians()));
+       if(address)
+               st.push_back((DataFile::Statement("address"), address));
+}
+
+
+BeamGate::Loader::Loader(BeamGate &g):
+       DataFile::ObjectLoader<BeamGate>(g)
+{
+       add("address",  &Loader::address);
+       add("position", &Loader::position);
+       add("rotation", &Loader::rotation);
+}
+
+void BeamGate::Loader::address(unsigned a)
+{
+       obj.set_address(a);
+}
+
+void BeamGate::Loader::position(float x, float y, float z)
+{
+       obj.set_position(Vector(x, y, z));
+}
+
+void BeamGate::Loader::rotation(float r)
+{
+       obj.set_rotation(Angle::from_radians(r));
+}
+
+} // namespace R2C2
diff --git a/source/libr2c2/beamgate.h b/source/libr2c2/beamgate.h
new file mode 100644 (file)
index 0000000..c12afbf
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef LIBR2C2_BEAMGATE_H_
+#define LIBR2C2_BEAMGATE_H_
+
+#include "beamgatetype.h"
+#include "sensor.h"
+#include "trackattachment.h"
+
+namespace R2C2 {
+
+class BeamGate: public TrackAttachment, public Sensor
+{
+public:
+       class Loader: public Msp::DataFile::ObjectLoader<BeamGate>
+       {
+       public:
+               Loader(BeamGate &);
+       private:
+               void address(unsigned);
+               void position(float, float, float);
+               void rotation(float);
+       };
+
+private:
+       using TrackAttachment::layout;
+
+public:
+       BeamGate(Layout &);
+       virtual ~BeamGate();
+
+       virtual BeamGate *clone(Layout * = 0) const;
+       virtual const BeamGateType &get_type() const;
+
+       void set_address(unsigned);
+       virtual void set_position(const Vector &);
+       virtual void set_rotation(const Angle &);
+       virtual void set_tilt(const Angle &) { }
+private:
+       void update_attachment();
+
+public:
+       virtual Block *get_block() const;
+
+       void save(std::list<Msp::DataFile::Statement> &) const;
+};
+
+} // namespace R2C2
+
+#endif
diff --git a/source/libr2c2/beamgatetype.cpp b/source/libr2c2/beamgatetype.cpp
new file mode 100644 (file)
index 0000000..46f0aad
--- /dev/null
@@ -0,0 +1,37 @@
+#include <msp/geometry/box.h>
+#include <msp/geometry/transformedshape.h>
+#include <msp/geometry/union.h>
+#include "beamgatetype.h"
+
+using namespace std;
+using namespace Msp;
+
+namespace R2C2 {
+
+BeamGateType::BeamGateType():
+       ObjectType(ArticleNumber(0))
+{
+       name = "Beam gate";
+       Geometry::TransformedShape<float, 3> box1(
+               Geometry::Box<float>(0.005, 0.03, 0.002),
+               Transform::translation(Vector(0, 0, 0.001)));
+       Geometry::TransformedShape<float, 3> box2(
+               Geometry::Box<float>(0.005, 0.008, 0.023),
+               Transform::translation(Vector(0, -0.025, 0.0125)));
+       Geometry::TransformedShape<float, 3> box3(
+               Geometry::Box<float>(0.005, 0.008, 0.023),
+               Transform::translation(Vector(0, 0.025, 0.0125)));
+       vector<Shape *> shapes;
+       shapes.push_back(&box1);
+       shapes.push_back(&box2);
+       shapes.push_back(&box3);
+       shape = Geometry::Union<float, 3>::from_iterator_range(shapes.begin(), shapes.end()).clone();
+}
+
+const BeamGateType &BeamGateType::instance()
+{
+       static BeamGateType type;
+       return type;
+}
+
+} // namespace R2C2
diff --git a/source/libr2c2/beamgatetype.h b/source/libr2c2/beamgatetype.h
new file mode 100644 (file)
index 0000000..2c5ac1d
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef LIBR2C2_BEAMGATETYPE_H_
+#define LIBR2C2_BEAMGATETYPE_H_
+
+#include "objecttype.h"
+
+namespace R2C2 {
+
+class BeamGateType: public ObjectType
+{
+private:
+       BeamGateType();
+public:
+       static const BeamGateType &instance();
+};
+
+} // namespace R2C2
+
+#endif
index 2a2473732aac1e24cfd0b75fc62256ed8f60bf8e..8d3381da20ecada6172781d064b9feba998e669a 100644 (file)
@@ -1,5 +1,6 @@
 #include <msp/core/maputils.h>
 #include <msp/core/raii.h>
+#include "beamgate.h"
 #include "blockallocator.h"
 #include "block.h"
 #include "catalogue.h"
@@ -273,11 +274,18 @@ bool BlockAllocator::reserve_block(const BlockIter &block)
        }
 }
 
-void BlockAllocator::advance_front(const Block *block)
+void BlockAllocator::advance_front(const Block *block, bool inclusive)
 {
        BlockList::iterator end;
        if(block)
-               end = find_if(cur_blocks_end, blocks.end(), BlockMatch(*block));
+       {
+               end = cur_blocks_end;
+               if(inclusive)
+                       --end;
+               end = find_if(end, blocks.end(), BlockMatch(*block));
+               if(inclusive && end!=blocks.end())
+                       ++end;
+       }
        else
                end = blocks.end();
 
@@ -291,7 +299,10 @@ void BlockAllocator::advance_front(const Block *block)
 
 void BlockAllocator::advance_front(const Sensor *sensor)
 {
-       advance_front(sensor ? sensor->get_block() : 0);
+       if(sensor)
+               advance_front(sensor->get_block(), dynamic_cast<const BeamGate *>(sensor));
+       else
+               advance_front(0, false);
 }
 
 void BlockAllocator::advance_back()
@@ -303,17 +314,37 @@ void BlockAllocator::advance_back()
        block list and locate the first sensor that's still active. */
        Sensor *last_inactive = 0;
        for(BlockList::iterator i=blocks.begin(); (i!=cur_blocks_end && i->block()!=&veh_block); ++i)
+       {
+               list<Sensor *> sensors;
                if(Sensor *sensor = (*i)->get_sensor())
+                       sensors.push_back(sensor);
+
+               Block *block = &**i;
+               for(TrackIter j=i->track_iter(); (j && &j->get_block()==block); j=j.next())
+                       if(!j->get_attachments().empty())
+                       {
+                               Track::AttachmentList attachments = j->get_attachments_ordered(j.entry());
+                               for(Track::AttachmentList::const_iterator k=attachments.begin(); k!=attachments.end(); ++k)
+                                       if(BeamGate *gate = dynamic_cast<BeamGate *>(*k))
+                                               sensors.push_back(gate);
+                       }
+
+               for(list<Sensor *>::const_iterator j=sensors.begin(); j!=sensors.end(); ++j)
                {
-                       if(sensor->get_state())
+                       if((*j)->get_state())
                        {
                                if(last_inactive)
+                               {
+                                       if(dynamic_cast<BeamGate *>(*j))
+                                               ++i;
                                        release_blocks_begin(i);
+                               }
                                return;
                        }
                        else
-                               last_inactive = sensor;
+                               last_inactive = *j;
                }
+       }
 }
 
 void BlockAllocator::release_blocks_begin(const BlockList::iterator &end)
@@ -416,17 +447,48 @@ void BlockAllocator::sensor_state_changed(Sensor &sensor, Sensor::State state)
 
 void BlockAllocator::update_next_sensor(Sensor *after)
 {
+       BeamGate *after_gate = dynamic_cast<BeamGate *>(after);
+
        BlockList::iterator i = cur_blocks_end;
        if(after)
+       {
+               if(after_gate)
+                       --i;
                i = find_if(i, blocks.end(), BlockMatch(*after->get_block()));
+       }
 
        for(; i!=blocks.end(); ++i)
+       {
                if(Sensor *sensor = (*i)->get_sensor())
-                       if(sensor!=next_sensor)
+               {
+                       if(!after_gate && sensor!=next_sensor)
                        {
                                next_sensor = sensor;
                                return;
                        }
+               }
+
+               Block *block = &**i;
+               for(TrackIter j=i->track_iter(); (j && &j->get_block()==block); j=j.next())
+                       if(!j->get_attachments().empty())
+                       {
+                               Track::AttachmentList attachments = j->get_attachments_ordered(j.entry());
+                               for(Track::AttachmentList::const_iterator k=attachments.begin(); k!=attachments.end(); ++k)
+                                       if(BeamGate *gate = dynamic_cast<BeamGate *>(*k))
+                                       {
+                                               if(after_gate)
+                                               {
+                                                       if(gate==after_gate)
+                                                               after_gate = 0;
+                                               }
+                                               else
+                                               {
+                                                       next_sensor = gate;
+                                                       return;
+                                               }
+                                       }
+                       }
+       }
 
        next_sensor = 0;
 }
index ba939f7e2be6139bfcd219ad9b2b85b230958e98..f5af90e585a4913554645cb189ee61d9fea32b17 100644 (file)
@@ -65,7 +65,7 @@ public:
 private:
        void reserve_more();
        bool reserve_block(const BlockIter &);
-       void advance_front(const Block *);
+       void advance_front(const Block *, bool);
        void advance_front(const Sensor *);
        void advance_back();
        void release_blocks_begin(const BlockList::iterator &);
index 6cb0eb3634ae334cca8714b87f5d6fb7ae5251bd..b847637fab797481a34225ccf88dea9a2d29ceb4 100644 (file)
@@ -5,6 +5,7 @@
 #include <msp/datafile/writer.h>
 #include <msp/io/print.h>
 #include <msp/time/utils.h>
+#include "beamgate.h"
 #include "block.h"
 #include "catalogue.h"
 #include "driver.h"
@@ -104,6 +105,12 @@ void Layout::add(Sensor &s)
        }
 }
 
+void Layout::add(BeamGate &g)
+{
+       add(static_cast<Object &>(g));
+       add(static_cast<Sensor &>(g));
+}
+
 template<>
 const set<Object *> &Layout::get_all<Object>() const
 {
@@ -164,6 +171,12 @@ const set<TrackCircuit *> &Layout::get_all<TrackCircuit>() const
        return sensors.get<TrackCircuit>();
 }
 
+template<>
+const set<BeamGate *> &Layout::get_all<BeamGate>() const
+{
+       return sensors.get<BeamGate>();
+}
+
 template<typename T>
 T *Layout::pick(const Ray &ray)
 {
@@ -208,6 +221,12 @@ void Layout::remove(Sensor &s)
        sensors.erase(s);
 }
 
+void Layout::remove(BeamGate &g)
+{
+       remove(static_cast<Object &>(g));
+       remove(static_cast<Sensor &>(g));
+}
+
 unsigned Layout::allocate_turnout_id()
 {
        set<unsigned> used_ids;
@@ -390,6 +409,14 @@ void Layout::save(const string &fn) const
                writer.write(st);
        }
 
+       const set<BeamGate *> &gates = objects.get<BeamGate>();
+       for(set<BeamGate *>::const_iterator i=gates.begin(); i!=gates.end(); ++i)
+       {
+               DataFile::Statement st("beamgate");
+               (*i)->save(st.sub);
+               writer.write(st);
+       }
+
        const set<Route *> &routes = track_chains.get<Route>();
        for(set<Route *>::const_iterator i=routes.begin(); i!=routes.end(); ++i)
        {
@@ -500,6 +527,7 @@ Layout::Loader::Loader(Layout &l):
        new_tracks(false)
 {
        add("base",  &Layout::base);
+       add("beamgate", &Loader::beamgate);
        add("route", &Loader::route);
        add("signal", &Loader::signal);
        add("track", &Loader::track);
@@ -508,6 +536,12 @@ Layout::Loader::Loader(Layout &l):
        add("zone",  &Loader::zone);
 }
 
+void Layout::Loader::beamgate()
+{
+       BeamGate *gate = new BeamGate(obj);
+       load_sub(*gate);
+}
+
 void Layout::Loader::route()
 {
        Route *rte = new Route(obj);
index 6725a23e8c547510fe65fa1c7442e5a80ec6d5e3..26df423ed731b3f461f912ee04b4c57e19fde08e 100644 (file)
@@ -12,6 +12,7 @@
 namespace R2C2 {
 
 class ArticleNumber;
+class BeamGate;
 class Block;
 class Catalogue;
 class Driver;
@@ -35,6 +36,7 @@ public:
        public:
                Loader(Layout &);
        private:
+               void beamgate();
                void route();
                void signal(ArticleNumber);
                void track(ArticleNumber);
@@ -106,6 +108,7 @@ public:
        void add(TrackChain &);
        void add(Block &);
        void add(Sensor &);
+       void add(BeamGate &);
 
        template<typename T>
        const std::set<T *> &get_all() const;
@@ -117,6 +120,7 @@ public:
        void remove(Track &);
        void remove(TrackChain &);
        void remove(Sensor &);
+       void remove(BeamGate &);
 
        unsigned allocate_turnout_id();
 
index b2a49c722e7732938cfce5ed3cdefa95b5838d9b..aa2ba3f528627beb093dc936446b1f2b3bbd4d81 100644 (file)
@@ -422,9 +422,14 @@ void Train::loco_func_event(unsigned addr, unsigned func, bool state)
 
 void Train::sensor_state_changed(Sensor &sensor, Sensor::State state)
 {
+       if(state!=Sensor::MAYBE_ACTIVE)
+               return;
+
        Block *block = sensor.get_block();
+       if(!block || block->get_train()!=this)
+               return;
 
-       if(block && block->get_train()==this && state==Sensor::MAYBE_ACTIVE)
+       if(dynamic_cast<TrackCircuit *>(&sensor))
        {
                if(last_entry_block)
                {
index d7fa39ca7977a6917c48f16fdd3319ed6d82940a..9c6bda87d19c7f1ee0cc2db46e376e9f0f6c0058 100644 (file)
@@ -493,6 +493,11 @@ signal \7039
 
 layout
 {
+       beamgate
+       {
+               position -0.3876098 0.3496740 0.000000;
+               rotation 1.570800;
+       };
        track \24115
        {
                position 0.0806517 0.139002 0;