#################################################################################################### # # Invoking X3D model self-test: # # $ python PleasureCraftBlue.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. # #################################################################################################### from x3d import * newModel=X3D(profile='Immersive',version='3.0', head=head( children=[ meta(content='PleasureCraftBlue.x3d',name='title'), meta(content='Basic blue pleasure craft commonly seen in waterways throughout the world.',name='description'), meta(content='Xeena VRML importer, X3D-Edit 3.1, https://www.web3d.org/x3d/content/README.X3D-Edit.html',name='translator'), meta(content='28 August 2002',name='translated'), meta(content='20 October 2019',name='modified'), meta(content='Viewpoints need to be relabeled or reoriented',name='warning'), meta(content='https://savage.nps.edu/Savage/ShipsCivilian/SmallCraft/PleasureCraftBlue.x3d',name='identifier'), meta(content='http://www.rdservice.de/german/produkte/VRCreator/library/vrlibrary.htm',name='reference'), meta(content='X3D-Edit 3.2, https://savage.nps.edu/X3D-Edit',name='generator'), meta(content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html',name='generator'), meta(content='../../license.html',name='license')]), Scene=Scene( children=[ WorldInfo(title='PleasureCraftBlue.x3d'), NavigationInfo(type='"EXAMINE" "FLY" "ANY"'), Background(groundAngle=[1.309,1.570796],groundColor=[(0.1,0.1,0),(0.4,0.25,0.2),(0.6,0.6,0.6)],skyAngle=[1.309,1.571],skyColor=[(0,0.2,0.7),(0,0.5,1),(1,1,1)]), Switch(whichChoice=0, children=[ Inline(url=["GridXZ_20x20Movable.wrl","https://www.web3d.org/x3d/content/examples/Basic/course/GridXZ_20x20Movable.wrl","https://savage.nps.edu/Savage/Tools/Authoring/GridXZ_20x20Movable.wrl","GridXZ_20x20Movable.x3d","https://www.web3d.org/x3d/content/examples/Basic/course/GridXZ_20x20Movable.x3d","https://savage.nps.edu/Savage/Tools/Authoring/GridXZ_20x20Movable.x3d"])]), Transform(scale=(0.333,0.333,0.333), children=[ Transform(DEF='Root',rotation=(0,1,0,1.57), children=[ Group( children=[ Viewpoint(description='Pleasure Craft starboard view',orientation=(0.0,1.0,0.0,1.57),position=(34.4,0.0,0.0)), Viewpoint(description='Pleasure Craft Front View',orientation=(0.0,1.0,0.0,3.1415927),position=(0.0,0.0,-34.4)), Viewpoint(description='Pleasure Craft port view',orientation=(0.0,1.0,0.0,-1.57),position=(-34.4,0.0,0.0)), Viewpoint(description='Pleasure Craft rear view',orientation=(0.0,1.0,0.0,0),position=(0,0.0,34.4)), Viewpoint(description='Pleasure Craft Top View',orientation=(1,0,0,-1.57),position=(0,34.4,0))]), Transform(DEF='windows', children=[ Shape( appearance=Appearance( material=Material(ambientIntensity=1.0,diffuseColor=(0.4873,0.4919,0.5306),shininess=1.0,specularColor=(0.6406,0.6939,0.902),transparency=.8)), geometry=IndexedFaceSet(coordIndex=[0,1,2,3,-1,4,5,6,7,-1,8,9,10,11,-1,12,13,14,15,-1,16,17,18,19,-1,20,21,22,23,-1,24,25,26,27,-1,28,29,16,19,-1,30,31,32,33,-1,34,35,36,37,-1,31,38,39,32,-1,40,41,42,43,-1,44,45,46,47,-1,11,48,8,-1,49,50,51,52,-1,53,54,55,56,-1,57,58,59,60,-1,60,61,57,-1],creaseAngle=1.0, coord=Coordinate(point=[(-2.897869,3.511071,1.01019),(-3.053716,2.841119,0.963676),(-3.055223,2.838728,3.612331),(-2.899224,3.508818,3.418565),(-0.298405,0.974013,7.933608),(-0.299806,2.285104,7.554146),(-3.24404,2.268261,7.130239),(-3.378355,0.856861,7.484504),(-3.539869,2.253301,6.768945),(-3.541674,2.25572,3.722138),(-3.591978,0.971996,3.749202),(-3.592863,0.971368,6.948678),(-3.544284,2.259213,-0.68383),(-3.59131,0.97325,-0.69687),(-3.5926,0.972626,3.210065),(-3.54198,2.256128,3.208399),(3.581997,1.508095,-4.454224),(3.552603,2.264137,-4.239289),(3.547343,2.26172,-1.191421),(3.595507,0.976011,-1.243255),(0.292646,2.285279,7.554482),(0.291593,0.974186,7.933942),(3.372115,0.858863,7.488326),(3.237369,2.270181,7.133909),(2.814516,2.825912,3.980942),(2.652185,3.526995,3.781634),(0.2351,3.537833,4.316372),(0.234921,2.840057,4.568108),(3.599292,0.949739,-4.460529),(3.603681,0.950878,-4.640622),(-3.546391,2.262034,-4.243309),(-3.575093,1.505974,-4.458276),(-3.591925,0.973881,-1.247326),(-3.544585,2.259619,-1.195438),(3.594268,0.975381,-0.692801),(3.546461,2.261315,-0.679813),(3.53975,2.258226,3.21241),(3.591132,0.974754,3.214135),(-3.59624,0.948745,-4.6447),(-3.592052,0.947607,-4.464602),(-2.897002,3.51558,-0.542649),(-3.051625,2.845898,-2.709697),(-3.053499,2.843507,0.587864),(-2.897708,3.513324,0.712821),(-2.655807,3.525423,3.778629),(-2.817948,2.824245,3.977752),(-0.239031,2.839915,4.567839),(-0.239338,3.537691,4.316103),(-3.588705,0.970305,7.116809),(3.055753,2.847706,-2.706238),(2.89828,3.517295,-0.539366),(2.897562,3.515039,0.716103),(3.053894,2.845315,0.591323),(3.053685,2.842927,0.967136),(2.897388,3.512786,1.013472),(2.89602,3.510533,3.421848),(3.052191,2.840536,3.61579),(3.587162,0.973495,6.952744),(3.589902,0.974125,3.75327),(3.538865,2.257816,3.726148),(3.533611,2.255399,6.772951),(3.582812,0.972431,7.120871)])))]), Transform(DEF='upper', children=[ Shape( appearance=Appearance( material=Material(ambientIntensity=0.6004,diffuseColor=(0.9837,0.9309,0.8392),shininess=1.0,specularColor=(0.8082,0.729,0.5708))), geometry=IndexedFaceSet(coordIndex=[0,1,2,3,-1,4,5,6,7,-1,8,9,10,11,-1,12,13,14,-1,15,16,17,18,-1,19,20,21,22,-1,2,23,24,25,-1,26,27,28,29,-1,30,15,18,31,-1,9,26,29,10,-1,32,33,34,35,-1,36,0,3,37,-1,38,34,33,6,-1,39,40,3,41,-1,42,27,26,9,-1,43,44,45,46,-1,17,47,48,-1,49,43,46,50,51,-1,52,18,17,28,-1,53,49,51,23,-1,41,3,54,31,-1,55,56,57,41,52,-1,6,33,58,59,-1,33,32,60,58,-1,57,12,14,41,-1,5,4,61,48,-1,62,63,21,20,64,-1,65,52,23,51,-1,66,67,2,50,-1,5,68,30,38,-1,55,69,13,56,-1,61,4,7,70,-1,35,34,25,24,-1,71,72,52,65,-1,61,29,28,17,-1,67,45,44,23,2,-1,11,60,24,23,-1,42,8,19,22,-1,68,5,48,47,-1,13,69,71,65,14,-1,34,38,54,25,-1,61,70,10,29,-1,40,73,37,3,-1,48,61,17,-1,46,66,50,-1,28,11,23,52,-1,22,27,42,-1,68,16,15,30,-1,72,55,52,-1,32,35,24,60,-1,7,6,59,70,-1,74,39,41,14,-1,27,62,28,-1,58,60,11,10,70,-1,21,63,22,-1,38,30,31,54,-1,22,63,62,27,-1,64,8,11,-1,70,59,58,-1,75,36,37,50,-1,52,41,31,18,-1,44,53,23,-1,8,42,9,-1,73,74,14,37,-1,6,5,38,-1,1,75,50,2,-1,3,2,25,54,-1,20,19,8,64,-1,16,68,47,17,-1,28,62,64,11,-1],creaseAngle=1.0, coord=Coordinate(point=[(0.2351,3.537833,4.316372),(2.652185,3.526995,3.781634),(2.829718,3.794248,3.648095),(-0.002176,3.807483,4.276133),(-0.971056,4.966994,1.836936),(-0.971195,5.182655,2.4816),(0.968059,5.18323,2.482697),(0.96878,4.967572,1.838033),(0.770125,4.46331,-0.108974),(0.769567,4.463208,0.728572),(0.767955,3.803211,0.728532),(0.768749,3.803409,-0.370559),(-3.055223,2.838728,3.612331),(-3.053716,2.841119,0.963676),(-3.121445,2.554446,4.0029),(-2.123263,5.179607,-0.043202),(-1.929271,5.18054,-0.032835),(-2.255612,3.799559,-0.372471),(-2.483764,3.798463,-0.384663),(0.771355,4.979306,-0.108907),(0.771587,4.979405,-0.370453),(1.08E-4,4.982133,-0.370692),(-0.771434,4.978851,-0.109781),(2.832882,3.801223,-1.925172),(2.484692,3.799937,-0.381849),(2.481277,3.797909,2.70614),(-0.770291,4.462752,0.7277),(-0.769901,4.462854,-0.109846),(-0.767836,3.802953,-0.37143),(-0.768287,3.802754,0.727662),(-2.123331,5.177887,2.582437),(-2.483843,3.796441,2.703327),(1.928984,5.181683,-0.030651),(1.926466,5.180102,2.364647),(2.120084,5.179144,2.58484),(2.122991,5.180866,-0.040798),(0.234921,2.840057,4.568108),(-0.002058,2.572767,4.715036),(-0.001804,5.187219,2.896409),(-2.655807,3.525423,3.778629),(-0.239338,3.537691,4.316103),(-2.833349,3.792572,3.644887),(1.04E-4,4.466166,-0.0918),(3.053894,2.845315,0.591323),(2.897562,3.515039,0.716103),(2.897388,3.512786,1.013472),(3.053685,2.842927,0.967136),(-2.255837,3.797702,2.44462),(-1.128826,3.802051,2.584734),(3.055753,2.847706,-2.706238),(3.11814,2.556293,4.006434),(3.122799,2.564915,-4.197869),(-2.830209,3.799547,-1.92838),(2.89828,3.517295,-0.539366),(-0.001494,3.807414,3.072581),(-2.897708,3.513324,0.712821),(-2.897869,3.511071,1.01019),(-2.899224,3.508818,3.418565),(2.253565,3.799039,2.447174),(1.12639,3.802721,2.586011),(2.256526,3.800898,-0.369915),(-1.128739,3.80245,1.82655),(-0.76984,4.462954,-0.371392),(-0.771373,4.978951,-0.371327),(0.77036,4.463409,-0.37052),(-3.116813,2.563068,-4.201403),(3.052191,2.840536,3.61579),(2.89602,3.510533,3.421848),(-1.929464,5.178959,2.362464),(-3.053499,2.843507,0.587864),(1.127162,3.80312,1.827827),(-3.051625,2.845898,-2.709697),(-2.897002,3.51558,-0.542649),(-0.239031,2.839915,4.567839),(-2.817948,2.824245,3.977752),(2.814516,2.825912,3.980942)])))]), Transform(DEF='deck', children=[ Shape( appearance=Appearance( material=Material(ambientIntensity=0.257133,diffuseColor=(0.098,0.4939,0.951),shininess=0.6628,specularColor=(0,0.5222,0.8531))), geometry=IndexedFaceSet(coordIndex=[0,1,2,3,-1,4,5,6,7,-1,8,9,10,11,-1,9,12,13,10,-1,14,15,16,-1,17,18,19,20,-1,21,18,17,-1,22,23,24,21,-1,25,26,7,27,-1,28,29,30,31,-1,32,33,31,30,-1,34,35,36,3,-1,37,38,39,40,-1,41,17,20,42,-1,25,27,43,-1,44,45,28,-1,29,28,46,47,-1,48,49,50,51,14,16,31,-1,12,37,40,13,-1,19,52,53,54,-1,35,55,56,36,-1,44,57,58,59,-1,28,45,60,46,-1,61,62,27,-1,63,64,65,24,-1,18,66,52,19,-1,67,68,16,7,-1,69,70,65,64,43,-1,13,40,71,-1,26,72,36,7,-1,73,74,75,3,63,-1,76,77,38,2,21,-1,78,79,80,81,-1,31,82,48,-1,58,83,84,85,-1,59,58,85,86,-1,6,61,27,7,-1,81,80,24,65,-1,20,19,54,87,-1,62,88,27,-1,57,89,83,58,-1,47,46,90,91,-1,92,4,7,16,-1,93,73,63,-1,21,79,66,18,-1,72,94,3,36,-1,88,95,33,27,-1,60,59,86,96,-1,43,97,69,-1,95,82,31,33,-1,24,80,79,21,-1,40,39,98,71,-1,99,100,101,22,-1,78,102,103,104,-1,46,60,96,90,-1,78,104,29,66,-1,105,67,7,36,-1,106,107,108,109,-1,76,41,42,107,-1,61,50,49,62,-1,104,30,29,-1,28,8,89,57,44,-1,30,104,110,32,-1,94,111,63,3,-1,39,106,109,98,-1,112,113,75,114,-1,103,102,70,69,-1,28,31,16,8,-1,66,79,78,-1,115,34,3,2,-1,42,20,87,116,-1,38,77,106,39,-1,5,14,51,6,-1,45,44,59,60,-1,83,11,117,84,-1,43,64,111,25,-1,2,1,118,-1,107,42,116,108,-1,118,112,2,-1,110,104,103,-1,11,10,119,117,-1,12,9,8,16,56,-1,65,70,102,78,81,-1,17,41,76,21,-1,75,113,3,-1,32,110,97,33,-1,71,120,13,-1,52,66,29,47,-1,121,105,36,56,-1,56,16,68,121,-1,23,93,63,24,-1,64,63,111,-1,52,47,91,53,-1,89,8,11,83,-1,15,92,16,-1,2,38,37,12,56,-1,56,55,115,2,-1,113,0,3,-1,43,27,33,97,-1,120,119,10,13,-1,103,69,97,110,-1,99,74,73,100,-1,77,76,107,106,-1,99,22,21,2,112,114,-1],creaseAngle=1.0, coord=Coordinate(point=[(-3.539869,2.253301,6.768945),(-3.588705,0.970305,7.116809),(-3.599939,0.668436,7.50948),(-3.528349,2.552904,6.998527),(3.533611,2.255399,6.772951),(3.538865,2.257816,3.726148),(3.53975,2.258226,3.21241),(3.521654,2.554991,7.00252),(3.819175,0.668173,10.005671),(1.989113,0.690848,12.913901),(1.989364,-0.041152,12.913901),(3.819429,-0.063824,10.005671),(-0.007473,0.690276,15.26136),(-0.007258,-0.041724,15.261362),(3.589902,0.974125,3.75327),(3.587162,0.973495,6.952744),(3.593784,0.670568,7.513554),(-5.569215,0.592345,-3.077267),(-5.181582,0.742909,-7.51076),(-5.181346,0.010912,-7.51076),(-5.568978,-0.139655,-3.077267),(-3.606748,0.677876,-5.005602),(-3.59624,0.948745,-4.6447),(-3.575093,1.505974,-4.458276),(-3.572155,1.587915,-4.746854),(3.122799,2.564915,-4.197869),(3.11814,2.556293,4.006434),(3.541417,2.564095,-4.465889),(5.192513,0.745613,-7.504884),(4.10724,0.691479,-14.968183),(3.633038,0.689463,-12.752789),(3.614758,0.680017,-5.001513),(3.632724,1.193463,-12.464788),(3.579334,1.590035,-4.742804),(-3.24404,2.268261,7.130239),(-0.299806,2.285104,7.554146),(-0.00364,2.573955,7.50944),(-2.001276,0.689808,12.911641),(-3.828028,0.666179,10.00134),(-3.827795,-0.065818,10.00134),(-2.00104,-0.042192,12.911641),(-5.759015,0.561333,-0.843862),(-5.758776,-0.170667,-0.843862),(3.1873,2.565079,-4.465976),(5.762515,0.564336,-0.837337),(5.575224,0.59525,-3.070955),(5.192768,0.013616,-7.504884),(4.107464,-0.040521,-14.968183),(3.599292,0.949739,-4.460529),(3.595507,0.976011,-1.243255),(3.594268,0.975381,-0.692801),(3.591132,0.974754,3.214135),(-4.087738,-0.042949,-14.972824),(-3.807647,-0.04287,-14.672675),(-4.863029,0.011321,-7.488178),(-0.298405,0.974013,7.933608),(-0.003398,0.690267,8.066879),(5.773005,0.475826,3.106674),(5.773255,-0.256174,3.106674),(5.762765,-0.167664,-0.837337),(5.575478,-0.136751,-3.070955),(3.546461,2.261315,-0.679813),(3.547343,2.26172,-1.191421),(-3.535129,2.561998,-4.469897),(-3.181011,2.563192,-4.469583),(-3.23805,1.590624,-4.746385),(-4.087947,0.689051,-14.972824),(3.237369,2.270181,7.133909),(3.372115,0.858863,7.488326),(3.054758,-1.390042,-5.620583),(-3.04482,-1.39185,-5.624037),(-1.733651,-0.042127,12.747202),(-0.002058,2.572767,4.715036),(-3.544585,2.259619,-1.195438),(-3.544284,2.259213,-0.68383),(-3.54198,2.256128,3.208399),(-5.773913,0.472815,3.100135),(-5.027364,0.560943,7.030609),(-3.315224,0.688332,-12.756967),(-3.616251,0.687315,-12.756893),(-3.616562,1.191315,-12.468893),(-3.315536,1.192333,-12.468966),(3.603681,0.950878,-4.640622),(5.022199,-0.168436,7.036303),(4.715044,-0.169476,6.946447),(5.452548,-0.255668,3.08774),(5.444472,-0.167165,-0.812929),(-5.251223,-0.139182,-3.048241),(3.552603,2.264137,-4.239289),(5.021948,0.563564,7.0363),(4.874419,0.01386,-7.482663),(3.827031,-0.040609,-14.668351),(3.582812,0.972431,7.120871),(-3.546391,2.262034,-4.243309),(-3.121445,2.554446,4.0029),(3.581997,1.508095,-4.454224),(5.257689,-0.136443,-3.042289),(3.245228,1.592546,-4.742714),(-3.544058,-0.066899,9.86294),(-3.59131,0.97325,-0.69687),(-3.591925,0.973881,-1.247326),(-3.592052,0.947607,-4.464602),(-3.047171,-1.38751,-12.757469),(3.06519,-1.3857,-12.754008),(3.332011,0.690302,-12.753203),(0.292646,2.285279,7.554482),(-5.027128,-0.171057,7.030611),(-5.773677,-0.259185,3.100135),(-5.452949,-0.258512,3.081563),(-4.719872,-0.171937,6.941104),(3.331698,1.194302,-12.465202),(-3.116813,2.563068,-4.201403),(-3.591978,0.971996,3.749202),(-3.541674,2.25572,3.722138),(-3.5926,0.972626,3.210065),(-3.378355,0.856861,7.484504),(-5.440514,-0.170003,-0.819093),(3.535851,-0.065054,9.866949),(-3.592863,0.971368,6.948678),(1.722163,-0.041225,12.749158),(-0.006936,-0.041724,14.69523),(0.291593,0.974186,7.933942)])))]), Transform(DEF='hull', children=[ Shape( appearance=Appearance( material=Material(ambientIntensity=0.4,diffuseColor=(1.0,1.0,1.0),shininess=0.3,specularColor=(0.3,0.3,0.3))), geometry=IndexedFaceSet(coordIndex=[0,1,2,-1,3,4,5,6,-1,7,8,9,-1,10,11,12,13,-1,14,15,16,-1,17,18,19,-1,0,20,21,-1,22,23,0,-1,24,2,1,-1,25,26,27,-1,28,29,30,31,-1,32,33,34,35,-1,36,37,38,-1,10,39,21,40,-1,24,41,25,-1,35,42,16,-1,43,26,25,-1,34,44,45,42,-1,46,47,48,-1,49,50,51,-1,23,1,0,-1,0,2,20,-1,20,52,36,-1,53,54,55,-1,56,57,29,28,-1,25,41,43,-1,18,17,37,51,-1,39,22,0,21,-1,58,11,59,60,-1,61,62,49,-1,63,55,14,-1,64,57,56,-1,26,43,65,54,-1,49,37,66,-1,1,9,41,24,-1,11,10,40,59,-1,49,51,37,-1,33,67,44,-1,68,69,70,-1,68,67,33,-1,48,47,71,72,-1,52,73,66,36,-1,3,74,75,76,-1,38,37,17,75,-1,16,31,77,-1,39,10,13,70,-1,43,68,65,-1,44,34,33,-1,24,78,79,80,-1,60,59,81,74,-1,73,61,49,-1,47,30,82,71,-1,23,22,69,-1,22,39,70,69,-1,71,82,83,5,4,84,85,86,72,-1,24,25,78,-1,40,87,81,59,-1,75,17,88,76,-1,27,26,54,53,-1,58,64,56,-1,55,63,53,-1,36,87,20,-1,24,80,2,-1,40,21,20,87,-1,76,88,85,84,-1,55,32,35,-1,12,56,28,45,-1,54,65,32,-1,43,8,68,-1,2,80,73,52,-1,2,52,20,-1,36,66,37,-1,54,32,55,-1,30,29,83,82,-1,55,35,15,-1,64,6,5,-1,23,7,1,-1,87,36,38,81,-1,17,19,88,-1,14,16,89,-1,70,13,44,67,-1,69,68,8,-1,83,29,57,5,-1,7,9,1,-1,58,60,6,-1,78,90,91,79,-1,77,31,30,47,-1,44,13,12,45,-1,23,69,8,-1,77,46,89,16,-1,73,49,66,-1,3,76,84,4,-1,62,61,79,-1,64,5,57,-1,9,8,43,41,-1,42,45,28,31,-1,16,42,31,-1,88,19,86,85,-1,81,38,75,74,-1,80,79,61,73,-1,35,34,42,-1,65,68,33,32,-1,68,70,67,-1,46,77,47,-1,79,91,62,-1,6,60,74,3,-1,25,90,78,-1,15,35,16,-1,23,8,7,-1,11,58,56,12,-1,55,15,14,-1,62,50,49,-1,64,58,6,-1],creaseAngle=1.0, coord=Coordinate(point=[(-1.006483,-4.784562,9.862223),(-0.776117,-3.914367,11.976885),(-2.171802,-3.87837,9.862064),(-2.106011,-4.43657,-7.488426),(-1.650306,-4.01289,-14.671425),(0.010882,-4.049683,-14.670547),(-0.740166,-4.621054,-7.487484),(-0.004227,-5.111875,12.564371),(0.767617,-3.913909,11.977759),(-0.005451,-3.374029,13.81822),(0.001389,-5.942452,3.083893),(0.003517,-5.676469,-0.814999),(1.009844,-4.954376,-0.814982),(1.007125,-5.025677,3.084397),(5.452548,-0.255668,3.08774),(4.746291,-1.907604,3.086949),(4.937074,-2.752919,-0.81375),(-4.976055,-1.689904,-3.047855),(-5.251223,-0.139182,-3.048241),(-4.863029,0.011321,-7.488178),(-2.391205,-4.324117,6.938583),(-1.005841,-5.023212,6.938494),(-0.002416,-6.057159,9.86257),(-0.003308,-5.742595,11.269866),(-1.070885,-1.998456,12.285061),(-0.006936,-0.041724,14.69523),(1.693706,-0.444849,12.611192),(1.722163,-0.041225,12.749158),(2.394654,-4.525108,-3.044703),(2.119866,-4.435317,-7.486033),(4.074001,-4.200657,-7.484802),(4.123045,-4.157673,-3.043947),(3.581929,-2.034567,6.944186),(3.134453,-3.784977,6.943892),(4.060078,-4.132236,3.086327),(4.313119,-2.541571,3.086634),(-4.058377,-4.13464,3.08173),(-4.931385,-2.755491,-0.819338),(-4.172206,-4.231719,-0.819617),(-7.74E-4,-6.015394,6.939355),(-1.004891,-5.026272,3.083257),(-0.006142,-1.999618,14.318507),(4.178382,-4.229246,-0.814888),(1.060903,-1.997824,12.286267),(2.391048,-4.48165,3.085396),(2.393954,-4.540933,-0.81477),(5.257689,-0.136443,-3.042289),(4.88118,-1.263689,-7.482623),(4.874419,0.01386,-7.482663),(-4.745582,-1.910077,3.081574),(-5.452949,-0.258512,3.081563),(-5.440514,-0.170003,-0.819093),(-3.137323,-3.786836,6.940341),(3.535851,-0.065054,9.866949),(3.277316,-0.66667,9.866319),(3.908477,-1.0672,6.945447),(1.010601,-4.899182,-3.045753),(0.754134,-4.620612,-7.486638),(0.004711,-5.435071,-3.046276),(-1.003237,-4.954971,-0.816122),(-1.001501,-4.899777,-3.046894),(-3.91296,-1.069518,6.941018),(-4.719872,-0.171937,6.941104),(4.715044,-0.169476,6.946447),(0.007043,-4.817779,-7.487175),(2.505341,-1.975464,9.865489),(-4.312357,-2.544127,3.08175),(2.388654,-4.322698,6.941289),(2.165675,-3.877084,9.86452),(1.000894,-4.783966,9.863359),(1.0037,-5.022616,6.939633),(3.868359,-1.408141,-14.668301),(3.827031,-0.040609,-14.668351),(-3.585838,-2.036692,6.940126),(-2.385774,-4.526526,-3.04741),(-4.114382,-4.160113,-3.048612),(-4.060282,-4.203068,-7.489409),(4.983555,-1.687308,-3.042214),(-1.704766,-0.445735,12.609267),(-3.28512,-0.668379,9.862603),(-2.512594,-1.97695,9.862648),(-2.38759,-4.542352,-0.817478),(3.492767,-3.841188,-14.668451),(1.67205,-4.011904,-14.669544),(-3.471126,-3.84325,-14.672396),(-3.848159,-1.410429,-14.67267),(-3.807647,-0.04287,-14.672675),(-2.389137,-4.483068,3.082689),(-4.868936,-1.26623,-7.488146),(5.444472,-0.167165,-0.812929),(-1.733651,-0.042127,12.747202),(-3.544058,-0.066899,9.86294)])))])])])]) ) # X3D model complete #################################################################################################### # Self-test diagnostics #################################################################################################### print('Self-test diagnostics for PleasureCraftBlue.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 PleasureCraftBlue.py load and self-test diagnostics complete.")