lvidx103
============

* TODO: make zsphere endcaps ON the default with flags to switch them off
* TODO: investigate no-shows in gltf viz


Issue : parsurf bbox bigger in z, g4poly bb misses both zsphere ends of capsule
----------------------------------------------------------------------------------


::    

    10    10.035                   weight-shell0xc307920 lvidx 103 nsp    567                            union zsphere cylinder   nds[ 36]  4543 4547 4558 4562 4591 4595 4631 4635 4646 4650 ... 
          10.035                   weight-shell0xc307920 lvidx 103 nsp    567 

     amn (    -10.035   -10.035   -28.510) 
     bmn (    -10.035   -10.035   -18.475) 
     dmn (      0.000     0.000   -10.035) 

     amx (     10.035    10.035    28.510) 
     bmx (     10.035    10.035    18.475) 
     dmx (      0.000     0.000    10.035)



viz
-----

::

    op --dlv103 
        appears as cylinder without the spherical ends

    op --dlv103 --gltf 3
    op --dlv103 --gltf 1
        huh no show ???



opticks-;opticks-tbool-vi 103
---------------------------------

* ~/opticks_refs/lvidx103_tbool_zscy_union_coincidence_wierdness.png

Ahha ... my generated python is not setting the zsphere endcap flags, 



::

     78 # generated by tboolean.py : 20170706-1446 
     79 # opticks-;opticks-tbool 103 
     80 # opticks-;opticks-tbool-vi 103 
     81 
     82 
     83 a = CSG("cylinder", param = [0.000,0.000,0.000,10.035],param1 = [-18.475,18.475,0.000,0.000])
     84 b = CSG("zsphere", param = [0.000,0.000,0.000,10.035],param1 = [0.000,10.035,0.000,0.000])
     85 b.transform = [[1.000,0.000,0.000,0.000],[0.000,1.000,0.000,0.000],[0.000,0.000,1.000,0.000],[0.000,0.000,18.475,1.000]]
     86 ab = CSG("union", left=a, right=b)

     ##         a.z                                   -18.475,18.475
     ##         b.z   0+18.475, 10.035+18.475 ->              18.475, 28.51
     ##                                                       ^^^^^^^  
     ##                                                 union coincidence z=18.475
     ##

     87 
     88 c = CSG("zsphere", param = [0.000,0.000,0.000,10.035],param1 = [0.000,10.035,0.000,0.000])
     89 c.transform = [[1.000,0.000,0.000,0.000],[0.000,-1.000,-0.000,0.000],[0.000,0.000,-1.000,0.000],[0.000,0.000,-18.475,1.000]]
     ## 
     ##    hmm transform is flipping y and z signs ?  
     ##               <rotation name="weight-shell0xc307920_rot" unit="deg" x="180" y="0" z="0"/>
     ##

     90 abc = CSG("union", left=ab, right=c)
     ##
     ##         c.z    0 -   > 10.035 
     ##              -10.035 -> 0      + ( -18.475 )
     ##
     ##                   -28.51 --> -18.475           union coincidence z=-18.475
     ##   
     91 
     92 
     93 
     94 obj = abc
     95 
     96 con = CSG("sphere",  param=[0,0,0,10], container="1", containerscale="2", boundary=args.container , poly="IM", resolution="20" )
     97 CSG.Serialize([con, obj], args.csgpath )


GDML
------

::

     36.95/2.
     Out[14]: 18.475

     1249     <tube aunit="deg" deltaphi="360" lunit="mm" name="WeightMidCylinder0xc307d80" rmax="10.035" rmin="0" startphi="0" z="36.95"/>
     1250     <sphere aunit="deg" deltaphi="360" deltatheta="90" lunit="mm" name="WeightTop0xc307e28" rmax="10.035" rmin="0" startphi="0" starttheta="0"/>

     1251     <union name="WeightMidCylinder+ChildForweight-shell0xc17e030">
     1252       <first ref="WeightMidCylinder0xc307d80"/>
     1253       <second ref="WeightTop0xc307e28"/>
     1254       <position name="WeightMidCylinder+ChildForweight-shell0xc17e030_pos" unit="mm" x="0" y="0" z="18.475"/>
     1255     </union>
     1256     <sphere aunit="deg" deltaphi="360" deltatheta="90" lunit="mm" name="WeightBot0xc307f00" rmax="10.035" rmin="0" startphi="0" starttheta="0"/>

     1257     <union name="weight-shell0xc307920">
     1258       <first ref="WeightMidCylinder+ChildForweight-shell0xc17e030"/>
     1259       <second ref="WeightBot0xc307f00"/>
     1260       <position name="weight-shell0xc307920_pos" unit="mm" x="0" y="0" z="-18.475"/>
     1261       <rotation name="weight-shell0xc307920_rot" unit="deg" x="180" y="0" z="0"/>
     1262     </union>



G4DAE
--------

     32744       <mesh>
     32745         <source id="weight-shell0xc307920-Pos">
     32746           <float_array count="150" id="weight-shell0xc307920-Pos-array">
     32747                 10.035 0 18.475
     32748                 9.69307 2.59725 18.475
     32749                 8.69056 5.0175 18.475
     32750                 7.09582 7.09582 18.475
     32751                 5.0175 8.69056 18.475
     32752                 2.59725 9.69307 18.475
     32753                 6.14446e-16 10.035 18.475
     32754                 -2.59725 9.69307 18.475
     32755                 -5.0175 8.69056 18.475
     32756                 -7.09582 7.09582 18.475
     32757                 -8.69056 5.0175 18.475
     32758                 -9.69307 2.59725 18.475
     32759                 -10.035 1.22889e-15 18.475
     32760                 -9.69307 -2.59725 18.475
     32761                 -8.69056 -5.0175 18.475
     32762                 -7.09582 -7.09582 18.475
     32763                 -5.0175 -8.69056 18.475
     32764                 -2.59725 -9.69307 18.475
     32765                 -1.84334e-15 -10.035 18.475
     32766                 2.59725 -9.69307 18.475
     32767                 5.0175 -8.69056 18.475
     32768                 7.09582 -7.09582 18.475
     32769                 8.69056 -5.0175 18.475
     32770                 9.69307 -2.59725 18.475
     32771                 10.035 0 -18.475
     32772                 9.69307 2.59725 -18.475
     32773                 8.69056 5.0175 -18.475
     32774                 7.09582 7.09582 -18.475
     32775                 5.0175 8.69056 -18.475
     32776                 2.59725 9.69307 -18.475
     32777                 6.14446e-16 10.035 -18.475
     32778                 -2.59725 9.69307 -18.475
     32779                 -5.0175 8.69056 -18.475
     32780                 -7.09582 7.09582 -18.475
     32781                 -8.69056 5.0175 -18.475
     32782                 -9.69307 2.59725 -18.475
     32783                 -10.035 1.22889e-15 -18.475
     32784                 -9.69307 -2.59725 -18.475
     32785                 -8.69056 -5.0175 -18.475
     32786                 -7.09582 -7.09582 -18.475
     32787                 -5.0175 -8.69056 -18.475
     32788                 -2.59725 -9.69307 -18.475
     32789                 -1.84334e-15 -10.035 -18.475
     32790                 2.59725 -9.69307 -18.475
     32791                 5.0175 -8.69056 -18.475
     32792                 7.09582 -7.09582 -18.475
     32793                 8.69056 -5.0175 -18.475
     32794                 9.69307 -2.59725 -18.475
     32795                 0 0 18.475
     32796                 0 0 -18.475
     32797 </float_array>