####################################################################################################
#
# Invoking X3D model self-test:
#
#   $ python Eight.py
#
# Python package x3d.py package is available on PyPI for import.
#   This approach simplifies Python X3D deployment and use.
#   https://pypi.org/project/x3d
#
# Installation:
#       pip install x3d
# or
#       python -m pip install x3d
#
# Developer options for loading x3d package in other Python programs:
#
#    from x3d import *  # preferred approach, terser source that avoids x3d.* class prefixes
#
# or
#    import x3d         # traditional way to subclass x3d package, all classes require x3d.* prefix,
#                       # but python source is very verbose, for example x3d.Material x3d.Shape etc.
#                       # X3dToPython.xslt stylesheet insertPackagePrefix=true supports this option.
#
# Project home page:    # X3D Python Scene Access Interface Library (X3DPSAIL)
#                       # https://www.web3d.org/x3d/stylesheets/python/python.html
# Conversion generator: # https://www.web3d.org/x3d/stylesheets/X3dToPython.xslt
#
####################################################################################################

from x3d import *

newModel=X3D(profile='Immersive',version='3.1',
  head=head(
    children=[
    meta(content='Eight.x3d',name='title'),
    meta(content='3D Hull Number',name='description'),
    meta(content='Patrick Sullivan',name='creator'),
    meta(content='20 February 2006',name='created'),
    meta(content='20 October 2019',name='modified'),
    meta(content='1.0',name='version'),
    meta(content='Hull Numbers, ship markings',name='subject'),
    meta(content='https://www.web3d.org/x3d/content/examples/Savage/ModelDetailing/HullNumbers/Eight.x3d',name='identifier'),
    meta(content='../../license.html',name='license')]),
  Scene=Scene(
    children=[
    WorldInfo(title='Eight.x3d'),
    Group(DEF='Eight',
      children=[
      Transform(DEF='dad_HullNumber8_copy19',
        children=[
        Shape(DEF='HullNumber8_copy19',
          appearance=Appearance(
            material=Material(DEF='white2_mat',ambientIntensity=1,diffuseColor=(1,1,1),shininess=0,specularColor=(1,1,1))),
          geometry=IndexedFaceSet(coordIndex=[0,1,2,-1,0,2,3,-1,0,4,5,-1,0,5,6,-1,0,3,7,-1,0,7,8,-1,0,8,9,-1,0,9,10,-1,0,10,4,-1,0,6,11,-1,0,11,1,-1,1,12,2,-1,1,11,13,-1,1,13,12,-1,12,14,15,-1,12,15,2,-1,12,13,16,-1,12,16,14,-1,14,17,15,-1,14,16,18,-1,14,18,17,-1,17,19,20,-1,17,20,15,-1,17,18,21,-1,17,21,19,-1,19,22,20,-1,19,21,23,-1,19,23,22,-1,22,24,25,-1,22,25,20,-1,22,23,26,-1,22,26,24,-1,24,27,25,-1,24,26,28,-1,24,28,27,-1,27,29,30,-1,27,30,25,-1,27,28,31,-1,27,31,29,-1,29,32,33,-1,29,33,30,-1,29,31,34,-1,29,34,32,-1,32,35,36,-1,32,36,33,-1,32,34,37,-1,32,37,35,-1,35,38,36,-1,35,37,39,-1,35,39,38,-1,38,40,41,-1,38,41,36,-1,38,39,42,-1,38,42,40,-1,40,43,41,-1,40,42,44,-1,40,44,43,-1,43,45,46,-1,43,46,41,-1,43,44,47,-1,43,47,45,-1,45,48,49,-1,45,49,46,-1,45,47,50,-1,45,50,48,-1,48,50,51,-1,48,51,49,-1,49,52,53,-1,49,53,46,-1,49,51,54,-1,49,54,52,-1,52,55,53,-1,52,54,56,-1,52,56,55,-1,55,57,58,-1,55,58,53,-1,55,56,59,-1,55,59,57,-1,57,60,58,-1,57,59,61,-1,57,61,60,-1,60,62,63,-1,60,63,58,-1,60,61,64,-1,60,64,62,-1,62,65,66,-1,62,66,67,-1,62,68,63,-1,62,67,69,-1,62,69,68,-1,62,64,70,-1,62,70,65,-1,65,71,66,-1,65,70,72,-1,65,72,71,-1,71,73,74,-1,71,74,66,-1,71,72,75,-1,71,75,73,-1,73,76,74,-1,73,75,77,-1,73,77,76,-1,76,78,79,-1,76,79,74,-1,76,77,80,-1,76,80,78,-1,78,81,82,-1,78,82,79,-1,78,80,83,-1,78,83,81,-1,81,84,85,-1,81,85,82,-1,81,83,86,-1,81,86,84,-1,84,87,88,-1,84,88,85,-1,84,86,89,-1,84,89,87,-1,87,90,91,-1,87,91,88,-1,87,89,92,-1,87,92,90,-1,90,93,94,-1,90,94,91,-1,90,92,95,-1,90,95,93,-1,93,96,97,-1,93,97,94,-1,93,95,98,-1,93,98,96,-1,96,99,100,-1,96,100,97,-1,96,98,101,-1,96,101,99,-1,99,102,100,-1,99,101,103,-1,99,103,102,-1,102,104,10,-1,102,10,100,-1,102,103,105,-1,102,105,104,-1,104,4,10,-1,104,105,5,-1,104,5,4,-1,15,20,106,-1,15,106,107,-1,15,107,108,-1,15,108,2,-1,2,108,109,-1,2,109,3,-1,3,109,110,-1,3,110,7,-1,7,111,112,-1,7,112,8,-1,7,110,113,-1,7,113,111,-1,111,68,69,-1,111,69,112,-1,111,113,114,-1,111,114,68,-1,68,114,115,-1,68,115,63,-1,63,115,116,-1,63,116,58,-1,58,116,117,-1,58,117,53,-1,53,117,118,-1,53,118,46,-1,46,118,119,-1,46,119,41,-1,41,119,120,-1,41,120,36,-1,36,120,121,-1,36,121,33,-1,33,121,122,-1,33,122,30,-1,30,122,123,-1,30,123,25,-1,25,123,106,-1,25,106,20,-1,100,10,124,-1,100,124,125,-1,100,125,126,-1,100,126,97,-1,97,126,127,-1,97,127,94,-1,94,127,128,-1,94,128,91,-1,91,128,129,-1,91,129,88,-1,88,129,130,-1,88,130,85,-1,85,130,131,-1,85,131,82,-1,82,131,132,-1,82,132,79,-1,79,132,133,-1,79,133,74,-1,74,133,134,-1,74,134,66,-1,66,134,135,-1,66,135,67,-1,67,135,136,-1,67,136,69,-1,69,136,137,-1,69,137,112,-1,112,137,138,-1,112,138,8,-1,8,138,139,-1,8,139,9,-1,9,139,124,-1,9,124,10,-1,6,5,124,-1,6,124,139,-1,6,109,108,-1,6,108,11,-1,6,110,109,-1,6,139,138,-1,6,138,110,-1,11,108,13,-1,13,108,107,-1,13,107,16,-1,16,107,18,-1,18,107,106,-1,18,106,21,-1,21,106,23,-1,23,106,123,-1,23,123,26,-1,26,123,28,-1,28,123,122,-1,28,122,31,-1,31,122,121,-1,31,121,34,-1,34,121,120,-1,34,120,37,-1,37,120,39,-1,39,120,119,-1,39,119,42,-1,42,119,44,-1,44,119,118,-1,44,118,47,-1,47,118,51,-1,47,51,50,-1,51,118,117,-1,51,117,54,-1,54,117,56,-1,56,117,116,-1,56,116,59,-1,59,116,61,-1,61,116,115,-1,61,115,64,-1,64,114,136,-1,64,136,135,-1,64,115,114,-1,64,135,134,-1,64,134,70,-1,70,134,72,-1,72,134,133,-1,72,133,75,-1,75,133,77,-1,77,133,132,-1,77,132,80,-1,80,132,131,-1,80,131,83,-1,83,131,130,-1,83,130,86,-1,86,130,129,-1,86,129,89,-1,89,129,128,-1,89,128,92,-1,92,128,127,-1,92,127,95,-1,95,127,126,-1,95,126,98,-1,98,126,125,-1,98,125,101,-1,101,125,103,-1,103,125,124,-1,103,124,105,-1,105,124,5,-1,110,138,137,-1,110,137,113,-1,113,137,136,-1,113,136,114,-1],creaseAngle=0.524,
            coord=Coordinate(point=[(-.39252,.78746,-.04102),(-.49872,.72972,-.04102),(-.2215,.54185,-.04102),(-.18012,.6107,-.04102),(-.47357,.8402,-.04102),(-.4836,.83701,-.2),(-.40254,.78428,-.2),(-.12018,.65465,-.04102),(-.11334,.91502,-.04102),(-.16742,.94908,-.04102),(-.20221,1.00169,-.04102),(-.50874,.72654,-.2),(-.57318,.65221,-.04102),(-.5832,.64902,-.2),(-.61713,.55516,-.04102),(-.23529,.4525,-.04102),(-.62715,.55198,-.2),(-.63178,.43883,-.04102),(-.6418,.43564,-.2),(-.61615,.31603,-.04102),(-.22089,.36644,-.04102),(-.62617,.31284,-.2),(-.56928,.20543,-.04102),(-.5793,.20225,-.2),(-.49237,.11363,-.04102),(-.17768,.29771,-.04102),(-.50239,.11045,-.2),(-.38666,.04723,-.04102),(-.39668,.04404,-.2),(-.23969,.00694,-.04102),(-.11591,.25267,-.04102),(-.24971,.00376,-.2),(-.039,-.00649,-.04102),(-.04584,.23766,-.04102),(-.04902,-.00967,-.2),(.07855,-.0005,-.04102),(.02179,.25291,-.04102),(.06853,-.00369,-.2),(.18903,.01744,-.04102),(.179,.01426,-.2),(.28717,.04808,-.04102),(.08209,.29869,-.04102),(.27715,.0449,-.2),(.36774,.09215,-.04102),(.35771,.08896,-.2),(.4339,.15355,-.04102),(.12457,.3679,-.04102),(.42388,.15037,-.2),(.48883,.23619,-.04102),(.52582,.33299,-.04102),(.47881,.23301,-.2),(.5158,.32981,-.2),(.53815,.43687,-.04102),(.13873,.45348,-.04102),(.52812,.43369,-.2),(.52386,.54332,-.04102),(.51384,.54014,-.2),(.48102,.64,-.04102),(.12445,.53966,-.04102),(.471,.63682,-.2),(.40912,.72276,-.04102),(.39909,.71958,-.2),(.30768,.78746,-.04102),(.0816,.60875,-.04102),(.29766,.78428,-.2),(.38385,.84703,-.04102),(.10138,1.00011,-.04102),(.06842,.94859,-.04102),(.01996,.65416,-.04102),(.01837,.9149,-.04102),(.37383,.84385,-.2),(.43658,.90855,-.04102),(.42656,.90537,-.2),(.4776,.99571,-.04102),(.11237,1.0648,-.04102),(.46758,.99253,-.2),(.49127,1.08922,-.04102),(.48125,1.08603,-.2),(.45697,1.24107,-.04102),(.10089,1.13206,-.04102),(.44695,1.23789,-.2),(.35406,1.36461,-.04102),(.06647,1.18541,-.04102),(.34404,1.36143,-.2),(.17938,1.44664,-.04102),(.01422,1.2202,-.04102),(.16936,1.44346,-.2),(-.07025,1.47398,-.04102),(-.05072,1.2318,-.04102),(-.08027,1.4708,-.2),(-.26581,1.45201,-.04102),(-.11627,1.22044,-.04102),(-.27583,1.44883,-.2),(-.41889,1.38609,-.04102),(-.1684,1.18639,-.04102),(-.42891,1.38291,-.2),(-.54559,1.25548,-.04102),(-.20246,1.13426,-.04102),(-.55562,1.25229,-.2),(-.58783,1.09215,-.04102),(-.21381,1.06871,-.04102),(-.59785,1.08896,-.2),(-.57318,.98912,-.04102),(-.5832,.98594,-.2),(-.52924,.89879,-.04102),(-.53926,.8956,-.2),(-.23091,.36326,-.2),(-.24531,.44932,-.2),(-.23152,.53867,-.2),(-.19014,.60752,-.2),(-.1302,.65146,-.2),(-.05072,.6693,-.04102),(-.04389,.90367,-.04102),(-.06074,.66611,-.2),(.00994,.65098,-.2),(.07158,.60557,-.2),(.11443,.53647,-.2),(.12871,.45029,-.2),(.11455,.36472,-.2),(.07207,.29551,-.2),(.01177,.24973,-.2),(-.05586,.23447,-.2),(-.12593,.24949,-.2),(-.1877,.29453,-.2),(-.21223,.99851,-.2),(-.22383,1.06553,-.2),(-.21248,1.13108,-.2),(-.17842,1.1832,-.2),(-.12629,1.21726,-.2),(-.06074,1.22861,-.2),(.0042,1.21702,-.2),(.05644,1.18223,-.2),(.09087,1.12888,-.2),(.10234,1.06162,-.2),(.09136,.99692,-.2),(.0584,.94541,-.2),(.01837,.9149,-.24102),(-.04389,.90367,-.24102),(-.12337,.91184,-.2),(-.17744,.9459,-.2)])))]),
      Transform(DEF='dad_HullNumber8',
        children=[
        Shape(DEF='HullNumber8',
          appearance=Appearance(
            material=Material(DEF='main_mat',ambientIntensity=0.001,diffuseColor=(.001,.001,.001),shininess=0,specularColor=(.001,.001,.001))),
          geometry=IndexedFaceSet(coordIndex=[0,1,2,-1,0,2,3,-1,0,4,5,-1,0,5,6,-1,0,3,7,-1,0,7,8,-1,0,8,9,-1,0,9,10,-1,0,10,4,-1,0,6,11,-1,0,11,1,-1,1,12,2,-1,1,11,13,-1,1,13,12,-1,12,14,15,-1,12,15,2,-1,12,13,16,-1,12,16,14,-1,14,17,15,-1,14,16,18,-1,14,18,17,-1,17,19,20,-1,17,20,15,-1,17,18,21,-1,17,21,19,-1,19,22,20,-1,19,21,23,-1,19,23,22,-1,22,24,25,-1,22,25,20,-1,22,23,26,-1,22,26,24,-1,24,27,25,-1,24,26,28,-1,24,28,27,-1,27,29,30,-1,27,30,25,-1,27,28,31,-1,27,31,29,-1,29,32,33,-1,29,33,30,-1,29,31,34,-1,29,34,32,-1,32,35,36,-1,32,36,33,-1,32,34,37,-1,32,37,35,-1,35,38,36,-1,35,37,39,-1,35,39,38,-1,38,40,41,-1,38,41,36,-1,38,39,42,-1,38,42,40,-1,40,43,41,-1,40,42,44,-1,40,44,43,-1,43,45,46,-1,43,46,41,-1,43,44,47,-1,43,47,45,-1,45,48,49,-1,45,49,46,-1,45,47,50,-1,45,50,48,-1,48,50,51,-1,48,51,49,-1,49,52,53,-1,49,53,46,-1,49,51,54,-1,49,54,52,-1,52,55,53,-1,52,54,56,-1,52,56,55,-1,55,57,58,-1,55,58,53,-1,55,56,59,-1,55,59,57,-1,57,60,58,-1,57,59,61,-1,57,61,60,-1,60,62,63,-1,60,63,58,-1,60,61,64,-1,60,64,62,-1,62,65,66,-1,62,66,67,-1,62,68,63,-1,62,67,69,-1,62,69,68,-1,62,64,70,-1,62,70,65,-1,65,71,66,-1,65,70,72,-1,65,72,71,-1,71,73,74,-1,71,74,66,-1,71,72,75,-1,71,75,73,-1,73,76,74,-1,73,75,77,-1,73,77,76,-1,76,78,79,-1,76,79,74,-1,76,77,80,-1,76,80,78,-1,78,81,82,-1,78,82,79,-1,78,80,83,-1,78,83,81,-1,81,84,85,-1,81,85,82,-1,81,83,86,-1,81,86,84,-1,84,87,88,-1,84,88,85,-1,84,86,89,-1,84,89,87,-1,87,90,91,-1,87,91,88,-1,87,89,92,-1,87,92,90,-1,90,93,94,-1,90,94,91,-1,90,92,95,-1,90,95,93,-1,93,96,97,-1,93,97,94,-1,93,95,98,-1,93,98,96,-1,96,99,100,-1,96,100,97,-1,96,98,101,-1,96,101,99,-1,99,102,100,-1,99,101,103,-1,99,103,102,-1,102,104,10,-1,102,10,100,-1,102,103,105,-1,102,105,104,-1,104,4,10,-1,104,105,5,-1,104,5,4,-1,15,20,106,-1,15,106,107,-1,15,107,108,-1,15,108,2,-1,2,108,109,-1,2,109,3,-1,3,109,110,-1,3,110,7,-1,7,111,112,-1,7,112,8,-1,7,110,113,-1,7,113,111,-1,111,68,69,-1,111,69,112,-1,111,113,114,-1,111,114,68,-1,68,114,115,-1,68,115,63,-1,63,115,116,-1,63,116,58,-1,58,116,117,-1,58,117,53,-1,53,117,118,-1,53,118,46,-1,46,118,119,-1,46,119,41,-1,41,119,120,-1,41,120,36,-1,36,120,121,-1,36,121,33,-1,33,121,122,-1,33,122,30,-1,30,122,123,-1,30,123,25,-1,25,123,106,-1,25,106,20,-1,100,10,124,-1,100,124,125,-1,100,125,126,-1,100,126,97,-1,97,126,127,-1,97,127,94,-1,94,127,128,-1,94,128,91,-1,91,128,129,-1,91,129,88,-1,88,129,130,-1,88,130,85,-1,85,130,131,-1,85,131,82,-1,82,131,132,-1,82,132,79,-1,79,132,133,-1,79,133,74,-1,74,133,134,-1,74,134,66,-1,66,134,135,-1,66,135,67,-1,67,135,136,-1,67,136,69,-1,69,136,137,-1,69,137,112,-1,112,137,138,-1,112,138,8,-1,8,138,139,-1,8,139,9,-1,9,139,124,-1,9,124,10,-1,6,5,124,-1,6,124,139,-1,6,109,108,-1,6,108,11,-1,6,110,109,-1,6,139,138,-1,6,138,110,-1,11,108,13,-1,13,108,107,-1,13,107,16,-1,16,107,18,-1,18,107,106,-1,18,106,21,-1,21,106,23,-1,23,106,123,-1,23,123,26,-1,26,123,28,-1,28,123,122,-1,28,122,31,-1,31,122,121,-1,31,121,34,-1,34,121,120,-1,34,120,37,-1,37,120,39,-1,39,120,119,-1,39,119,42,-1,42,119,44,-1,44,119,118,-1,44,118,47,-1,47,118,51,-1,47,51,50,-1,51,118,117,-1,51,117,54,-1,54,117,56,-1,56,117,116,-1,56,116,59,-1,59,116,61,-1,61,116,115,-1,61,115,64,-1,64,114,136,-1,64,136,135,-1,64,115,114,-1,64,135,134,-1,64,134,70,-1,70,134,72,-1,72,134,133,-1,72,133,75,-1,75,133,77,-1,77,133,132,-1,77,132,80,-1,80,132,131,-1,80,131,83,-1,83,131,130,-1,83,130,86,-1,86,130,129,-1,86,129,89,-1,89,129,128,-1,89,128,92,-1,92,128,127,-1,92,127,95,-1,95,127,126,-1,95,126,98,-1,98,126,125,-1,98,125,101,-1,101,125,103,-1,103,125,124,-1,103,124,105,-1,105,124,5,-1,110,138,137,-1,110,137,113,-1,113,137,136,-1,113,136,114,-1],creaseAngle=0.524,
            coord=Coordinate(point=[(-.24716,.77272,-.08798),(-.35336,.71498,-.08798),(-.07614,.52711,-.08798),(-.03475,.59596,-.08798),(-.32821,.82545,-.08798),(-.33823,.82227,-.24696),(-.25718,.76953,-.24696),(.02518,.6399,-.08798),(.03202,.90028,-.08798),(-.02206,.93434,-.08798),(-.05685,.98695,-.08798),(-.36338,.71179,-.24696),(-.42782,.63746,-.08798),(-.43784,.63428,-.24696),(-.47177,.54041,-.08798),(-.08993,.43775,-.08798),(-.48179,.53723,-.24696),(-.48641,.42408,-.08798),(-.49644,.4209,-.24696),(-.47079,.30128,-.08798),(-.07553,.35169,-.08798),(-.48081,.2981,-.24696),(-.42391,.19068,-.08798),(-.43394,.1875,-.24696),(-.34701,.09889,-.08798),(-.03231,.28297,-.08798),(-.35703,.0957,-.24696),(-.2413,.03248,-.08798),(-.25132,.0293,-.24696),(-.09432,-.0078,-.08798),(.02945,.23793,-.08798),(-.10435,-.01099,-.24696),(.10636,-.02123,-.08798),(.09952,.22291,-.08798),(.09634,-.02441,-.24696),(.22391,-.01525,-.08798),(.16715,.23817,-.08798),(.21389,-.01843,-.24696),(.33439,.0027,-.08798),(.32436,-.00049,-.24696),(.43253,.03333,-.08798),(.22745,.28395,-.08798),(.42251,.03015,-.24696),(.5131,.0774,-.08798),(.50308,.07422,-.24696),(.57926,.1388,-.08798),(.26993,.35316,-.08798),(.56924,.13562,-.24696),(.63419,.22145,-.08798),(.67118,.31825,-.08798),(.62417,.21826,-.24696),(.66116,.31506,-.24696),(.68351,.42213,-.08798),(.28409,.43873,-.08798),(.67349,.41895,-.24696),(.66922,.52857,-.08798),(.6592,.52539,-.24696),(.62638,.62525,-.08798),(.26981,.52491,-.08798),(.61636,.62207,-.24696),(.55448,.70802,-.08798),(.54446,.70483,-.24696),(.45304,.77272,-.08798),(.22696,.594,-.08798),(.44302,.76953,-.24696),(.52921,.83229,-.08798),(.24674,.98536,-.08798),(.21378,.93385,-.08798),(.16532,.63941,-.08798),(.16373,.90016,-.08798),(.51919,.8291,-.24696),(.58195,.89381,-.08798),(.57192,.89063,-.24696),(.62296,.98097,-.08798),(.25773,1.05006,-.08798),(.61294,.97778,-.24696),(.63663,1.07447,-.08798),(.62661,1.07129,-.24696),(.60233,1.22633,-.08798),(.24625,1.11732,-.08798),(.59231,1.22314,-.24696),(.49943,1.34986,-.08798),(.21183,1.17066,-.08798),(.4894,1.34668,-.24696),(.32474,1.43189,-.08798),(.15958,1.20545,-.08798),(.31472,1.42871,-.24696),(.07511,1.45924,-.08798),(.09464,1.21705,-.08798),(.06509,1.45605,-.24696),(-.12045,1.43727,-.08798),(.02909,1.2057,-.08798),(-.13047,1.43408,-.24696),(-.27352,1.37135,-.08798),(-.02304,1.17164,-.08798),(-.28355,1.36816,-.24696),(-.40023,1.24073,-.08798),(-.05709,1.11952,-.08798),(-.41025,1.23755,-.24696),(-.44247,1.0774,-.08798),(-.06845,1.05396,-.08798),(-.45249,1.07422,-.24696),(-.42782,.97437,-.08798),(-.43784,.97119,-.24696),(-.38388,.88404,-.08798),(-.3939,.88086,-.24696),(-.08555,.34851,-.24696),(-.09995,.43457,-.24696),(-.08616,.52393,-.24696),(-.04478,.59277,-.24696),(.01516,.63672,-.24696),(.09464,.65455,-.08798),(.10148,.88893,-.08798),(.08462,.65137,-.24696),(.1553,.63623,-.24696),(.21694,.59082,-.24696),(.25979,.52173,-.24696),(.27407,.43555,-.24696),(.25991,.34998,-.24696),(.21743,.28076,-.24696),(.15713,.23499,-.24696),(.0895,.21973,-.24696),(.01943,.23474,-.24696),(-.04234,.27979,-.24696),(-.06687,.98377,-.24696),(-.07847,1.05078,-.24696),(-.06712,1.11633,-.24696),(-.03306,1.16846,-.24696),(.01907,1.20251,-.24696),(.08462,1.21387,-.24696),(.14956,1.20227,-.24696),(.20181,1.16748,-.24696),(.23623,1.11414,-.24696),(.2477,1.04688,-.24696),(.23672,.98218,-.24696),(.20376,.93066,-.24696),(.16373,.90016,-.28798),(.10148,.88893,-.28798),(.022,.89709,-.24696),(-.03208,.93115,-.24696)])))])])])
)

### X3D model conversion complete ###

####################################################################################################
# Self-test diagnostics
####################################################################################################

print('Self-test diagnostics for Eight.py:')
if        metaDiagnostics(newModel): # built-in utility method in X3D class
    print(metaDiagnostics(newModel)) # display meta info, hint, warning, error, TODO values in this model
# print('check newModel.XML() serialization...')
newModelXML= newModel.XML() # test export method XML() for exceptions during export
newModel.XMLvalidate()
# print(newModelXML) # diagnostic

try:
#   print('check newModel.VRML() serialization...')
    newModelVRML=newModel.VRML() # test export method VRML() for exceptions during export
    # print(prependLineNumbers(newModelVRML)) # debug
    print("Python-to-VRML export of VRML output successful", flush=True)
except Exception as err: # usually BaseException
    # https://stackoverflow.com/questions/18176602/how-to-get-the-name-of-an-exception-that-was-caught-in-python
    print("*** Python-to-VRML export of VRML output failed:", type(err).__name__, err)
    if newModelVRML: # may have failed to generate
        print(prependLineNumbers(newModelVRML, err.lineno))

try:
#   print('check newModel.JSON() serialization...')
    newModelJSON=newModel.JSON() # test export method JSON() for exceptions during export
#   print(prependLineNumbers(newModelJSON)) # debug
    print("Python-to-JSON export of JSON output successful (under development)")
except Exception as err: # usually SyntaxError
    print("*** Python-to-JSON export of JSON output failed:", type(err).__name__, err)
    if newModelJSON: # may have failed to generate
        print(prependLineNumbers(newModelJSON,err.lineno))

print("python Eight.py load and self-test diagnostics complete.")
