####################################################################################################
#
# Invoking X3D model self-test:
#
#   $ python l_carpal_distal_phalanx_4.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='Interactive',version='4.0',
  head=head(
    children=[
    meta(content='l_carpal_distal_phalanx_4.x3d',name='title'),
    meta(content='fingertip',name='description'),
    meta(content='Don Brutzman, Joe Williams, John Carlson, Damon Hernandez',name='creator'),
    meta(content='Don Brutzman',name='translator'),
    meta(content='5 December 2013',name='created'),
    meta(content='5 March 2026',name='translated'),
    meta(content='23 April 2026',name='modified'),
    meta(content='originals/ldphal4.x3d',name='reference'),
    meta(content='https://en.wikipedia.org/wiki/Carpal_bones',name='reference'),
    meta(content='https://en.wikipedia.org/wiki/List_of_bones_of_the_human_skeleton',name='reference'),
    meta(content='usage examples https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Medical',name='reference'),
    meta(content='X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit',name='generator'),
    meta(content='X3D Tidy, https://www.web3d.org/x3d/stylesheets/X3dTidy.html',name='generator'),
    meta(content='https://www.web3d.org/x3d/content/examples/HumanoidAnimation/Bones/l_carpal_distal_phalanx_4.x3d',name='identifier'),
    meta(content='../license.html',name='license')]),
  Scene=Scene(
    children=[
    WorldInfo(title='l_carpal_distal_phalanx_4.x3d'),
    Background(skyColor=[(0.858824,1,0.94902)]),
    Comment('user hover lights bone and reveals description, user selection/deselection temporarily binds/unbinds close-up hidden viewpoint'),
    TouchSensor(DEF='UserTouchSensor',description='bone l_carpal_distal_phalanx_4'),
    Transform(DEF='l_carpal_distal_phalanx_4',translation=(0.1603,0.7261,0.0698),
      children=[
      BooleanToggle(DEF='UserTouchState'),
      ROUTE(fromField='isActive',fromNode='UserTouchSensor',toField='set_boolean',toNode='UserTouchState'),
      Viewpoint(DEF='HiddenViewpoint',nearDistance=0.001,position=(0,0,0.2),retainUserOffsets=True,
        navigationInfo=NavigationInfo(transitionType=["ANIMATE"],type=["EXAMINE"])),
      ROUTE(fromField='toggle',fromNode='UserTouchState',toField='set_bind',toNode='HiddenViewpoint'),
      DirectionalLight(DEF='HiddenLight',ambientIntensity=1,color=(0.1,0.1,1),on=False),
      ROUTE(fromField='toggle',fromNode='UserTouchState',toField='on',toNode='HiddenLight'),
      Transform(DEF='CenterOfRotationForJoint',visible=False,
        children=[
        Comment('insert computations for joint center of rotation here'),
        Inline(DEF='AxesDisplay',description='RGB display axes showing XYZ direction in local coordinate system',url=["AxesDisplay.x3d"],visible=False)]),
      ROUTE(fromField='toggle',fromNode='UserTouchState',toField='visible',toNode='CenterOfRotationForJoint'),
      Shape(
        appearance=Appearance(
          material=Material(DEF='BoneMaterial',ambientIntensity=0.965,diffuseColor=(1,0.9765,0.8667),shininess=0.05,specularColor=(0.349,0.349,0.349))),
        geometry=IndexedFaceSet(DEF='l_carpal_distal_phalanx_4_geometry',coordIndex=[0,1,2,-1,3,4,5,-1,6,7,8,-1,9,10,11,-1,10,12,11,-1,13,14,15,-1,13,16,14,-1,17,18,19,-1,20,21,22,-1,23,24,25,-1,23,26,24,-1,27,21,28,-1,29,21,30,-1,31,21,32,-1,33,34,35,-1,33,36,34,-1,37,38,39,-1,37,40,38,-1,2,7,41,-1,2,8,7,-1,42,43,44,-1,43,45,44,-1,41,0,2,-1,46,47,48,-1,49,50,51,-1,50,52,51,-1,53,54,55,-1,56,57,58,-1,57,59,58,-1,60,61,62,-1,60,63,61,-1,64,65,57,-1,65,59,57,-1,63,60,66,-1,67,68,69,-1,67,70,68,-1,71,72,54,-1,71,73,72,-1,55,54,74,-1,33,54,75,-1,76,21,77,-1,78,21,31,-1,79,80,81,-1,79,82,80,-1,83,24,84,-1,24,26,84,-1,85,21,86,-1,28,21,29,-1,87,88,72,-1,88,89,72,-1,30,21,90,-1,86,21,20,-1,16,23,25,-1,25,14,16,-1,91,6,92,-1,92,93,91,-1,70,46,48,-1,48,68,70,-1,94,43,95,-1,96,97,81,-1,97,79,81,-1,32,21,27,-1,71,54,35,-1,75,54,53,-1,98,99,100,-1,98,101,99,-1,70,67,102,-1,67,103,102,-1,104,105,106,-1,106,107,104,-1,101,24,83,-1,101,98,24,-1,108,68,109,-1,108,69,68,-1,64,10,39,-1,64,12,10,-1,110,111,57,-1,33,35,54,-1,112,47,46,-1,112,113,47,-1,108,94,69,-1,94,82,69,-1,67,97,103,-1,67,79,97,-1,60,114,66,-1,115,88,116,-1,88,87,116,-1,117,43,42,-1,42,118,117,-1,44,119,120,-1,44,45,119,-1,121,122,123,-1,123,124,121,-1,22,21,76,-1,90,21,85,-1,125,126,127,-1,127,128,125,-1,55,129,53,-1,129,130,53,-1,73,131,132,-1,131,133,132,-1,77,21,78,-1,80,134,81,-1,23,135,136,-1,23,16,135,-1,137,138,139,-1,138,140,139,-1,141,119,142,-1,141,120,119,-1,143,106,144,-1,145,105,146,-1,136,147,23,-1,147,26,23,-1,148,149,150,-1,96,110,151,-1,52,112,51,-1,52,113,112,-1,10,9,152,-1,65,131,153,-1,133,38,40,-1,129,5,154,-1,129,3,5,-1,133,65,38,-1,133,131,65,-1,59,36,58,-1,59,34,36,-1,155,156,66,-1,155,130,156,-1,91,52,157,-1,113,52,91,-1,112,61,51,-1,112,102,61,-1,103,158,62,-1,103,97,158,-1,158,96,151,-1,158,97,96,-1,148,18,149,-1,148,19,18,-1,159,160,161,-1,160,159,162,-1,163,164,165,-1,164,163,166,-1,167,168,169,-1,167,170,168,-1,135,171,172,-1,171,135,173,-1,174,175,176,-1,174,177,175,-1,178,76,179,-1,76,178,22,-1,180,78,181,-1,78,180,77,-1,31,182,183,-1,32,182,31,-1,27,184,185,-1,28,184,27,-1,186,30,187,-1,30,186,29,-1,90,188,189,-1,85,188,90,-1,190,148,169,-1,191,148,190,-1,19,179,162,-1,179,19,178,-1,160,181,166,-1,181,160,180,-1,183,174,164,-1,182,174,183,-1,185,15,177,-1,184,15,185,-1,13,187,173,-1,187,13,186,-1,189,168,171,-1,188,168,189,-1,143,192,106,-1,193,192,143,-1,136,125,147,-1,194,125,136,-1,105,195,146,-1,105,126,195,-1,105,144,106,-1,144,105,145,-1,196,197,198,-1,196,199,197,-1,200,201,202,-1,200,203,201,-1,204,98,100,-1,205,98,204,-1,18,193,143,-1,18,17,193,-1,206,121,138,-1,128,121,206,-1,207,208,209,-1,210,208,207,-1,122,104,211,-1,104,122,127,-1,212,210,213,-1,212,208,210,-1,214,215,216,-1,214,217,215,-1,101,218,99,-1,101,219,218,-1,137,83,84,-1,137,220,83,-1,43,221,95,-1,43,117,221,-1,142,109,222,-1,142,119,109,-1,120,139,140,-1,139,120,141,-1,206,26,147,-1,84,26,206,-1,134,95,221,-1,95,134,80,-1,200,176,204,-1,200,165,176,-1,208,223,224,-1,223,208,212,-1,133,225,132,-1,133,40,225,-1,153,73,71,-1,153,131,73,-1,75,130,155,-1,53,130,75,-1,129,74,3,-1,74,129,55,-1,89,1,4,-1,88,1,89,-1,115,226,2,-1,227,226,115,-1,100,214,203,-1,214,100,99,-1,195,172,170,-1,194,172,195,-1,224,209,208,-1,209,224,228,-1,159,193,17,-1,193,159,198,-1,229,217,227,-1,229,215,217,-1,228,230,209,-1,228,231,230,-1,211,123,122,-1,123,211,232,-1,124,138,121,-1,140,138,124,-1,220,233,219,-1,233,220,234,-1,142,235,141,-1,142,92,235,-1,9,118,152,-1,9,117,118,-1,132,116,87,-1,225,116,132,-1,62,114,60,-1,62,158,114,-1,79,69,82,-1,69,79,67,-1,45,94,108,-1,45,43,94,-1,96,134,236,-1,81,134,96,-1,57,12,64,-1,57,111,12,-1,157,50,237,-1,157,52,50,-1,154,237,50,-1,237,154,5,-1,93,48,47,-1,222,48,93,-1,94,80,82,-1,80,94,95,-1,175,25,205,-1,175,14,25,-1,233,2,226,-1,233,8,2,-1,108,119,45,-1,109,119,108,-1,203,216,201,-1,216,203,214,-1,165,202,163,-1,202,165,200,-1,116,227,115,-1,116,229,227,-1,64,38,65,-1,39,38,64,-1,37,231,228,-1,152,231,37,-1,175,204,176,-1,175,205,204,-1,141,234,139,-1,141,235,234,-1,233,235,8,-1,235,233,234,-1,11,117,9,-1,11,221,117,-1,142,93,92,-1,93,142,222,-1,46,102,112,-1,102,46,70,-1,127,105,104,-1,127,126,105,-1,135,194,136,-1,135,172,194,-1,145,167,150,-1,145,146,167,-1,56,66,114,-1,66,56,58,-1,66,49,63,-1,66,156,49,-1,146,170,167,-1,170,146,195,-1,147,128,206,-1,125,128,147,-1,231,118,232,-1,152,118,231,-1,232,42,123,-1,232,118,42,-1,143,149,18,-1,144,149,143,-1,191,22,178,-1,191,20,22,-1,192,107,106,-1,107,192,207,-1,0,237,5,-1,0,41,237,-1,89,54,72,-1,89,74,54,-1,163,196,161,-1,163,202,196,-1,201,213,199,-1,213,201,216,-1,116,223,229,-1,116,225,223,-1,140,44,120,-1,140,124,44,-1,87,73,132,-1,87,72,73,-1,236,221,11,-1,236,134,221,-1,93,113,91,-1,93,47,113,-1,237,7,157,-1,41,7,237,-1,63,51,61,-1,49,51,63,-1,151,114,158,-1,56,114,151,-1,156,50,49,-1,156,154,50,-1,42,124,123,-1,124,42,44,-1,10,37,39,-1,37,10,152,-1,235,6,8,-1,235,92,6,-1,139,220,137,-1,139,234,220,-1,230,232,211,-1,232,230,231,-1,212,229,223,-1,212,215,229,-1,219,226,218,-1,226,219,233,-1,197,207,192,-1,207,197,210,-1,40,228,224,-1,228,40,37,-1,227,218,226,-1,217,218,227,-1,2,88,115,-1,2,1,88,-1,89,3,74,-1,89,4,3,-1,75,36,33,-1,75,155,36,-1,71,34,153,-1,35,34,71,-1,225,224,223,-1,225,40,224,-1,213,197,199,-1,213,210,197,-1,161,198,159,-1,196,198,161,-1,222,68,48,-1,222,109,68,-1,138,84,206,-1,138,137,84,-1,220,101,83,-1,220,219,101,-1,99,217,214,-1,99,218,217,-1,216,212,213,-1,216,215,212,-1,107,211,104,-1,107,230,211,-1,128,122,121,-1,127,122,128,-1,107,209,230,-1,207,209,107,-1,56,110,57,-1,56,151,110,-1,145,149,144,-1,145,150,149,-1,205,24,98,-1,25,24,205,-1,203,204,100,-1,204,203,200,-1,202,199,196,-1,202,201,199,-1,126,194,195,-1,126,125,194,-1,198,192,193,-1,198,197,192,-1,188,169,168,-1,190,169,188,-1,173,189,171,-1,189,173,187,-1,15,186,13,-1,186,15,184,-1,182,177,174,-1,185,177,182,-1,181,164,166,-1,183,164,181,-1,162,180,160,-1,180,162,179,-1,148,178,19,-1,178,148,191,-1,85,190,188,-1,86,190,85,-1,187,90,189,-1,90,187,30,-1,184,29,186,-1,29,184,28,-1,32,185,182,-1,27,185,32,-1,78,183,181,-1,31,183,78,-1,179,77,180,-1,77,179,76,-1,86,191,190,-1,86,20,191,-1,164,176,165,-1,174,176,164,-1,177,14,175,-1,177,15,14,-1,16,173,135,-1,173,16,13,-1,171,170,172,-1,168,170,171,-1,150,169,148,-1,150,167,169,-1,161,166,163,-1,166,161,160,-1,17,162,159,-1,17,19,162,-1,111,11,12,-1,11,111,236,-1,236,110,96,-1,110,236,111,-1,62,102,103,-1,61,102,62,-1,7,91,157,-1,91,7,6,-1,58,155,66,-1,58,36,155,-1,153,59,65,-1,153,34,59,-1,154,130,129,-1,156,130,154,-1,4,0,5,-1,1,0,4,-1],creaseAngle=1.571,
          coord=Coordinate(DEF='l_carpal_distal_phalanx_4_coordinate',point=[(-0.0040,-0.0012,0.0003),(-0.0040,-0.0014,-0.0001),(-0.0023,-0.0018,0.0005),(-0.0060,-0.0009,-0.0002),(-0.0058,-0.0010,-0.0001),(-0.0058,-0.0007,0.0003),(-0.0035,0.0002,0.0006),(-0.0038,-0.0004,0.0007),(-0.0022,-0.0006,0.0010),(-0.0028,0.0003,-0.0026),(-0.0030,-0.0003,-0.0027),(-0.0043,0.0009,-0.0037),(-0.0045,0.0003,-0.0038),(0.0050,0.0009,0.0042),(0.0043,-0.0005,0.0044),(0.0045,-0.0004,0.0043),(0.0050,0.0010,0.0042),(0.0055,-0.0033,-0.0034),(0.0056,-0.0032,-0.0034),(0.0056,-0.0033,-0.0032),(0.0058,-0.0011,-0.0007),(0.0056,-0.0011,0.0004),(0.0055,-0.0018,-0.0009),(0.0041,0.0012,0.0039),(0.0025,-0.0003,0.0042),(0.0033,-0.0004,0.0043),(0.0033,0.0010,0.0030),(0.0050,-0.0014,0.0015),(0.0051,-0.0009,0.0017),(0.0053,-0.0004,0.0017),(0.0058,-0.0001,0.0014),(0.0051,-0.0020,0.0007),(0.0050,-0.0018,0.0012),(-0.0073,0.0004,-0.0022),(-0.0070,0.0004,-0.0028),(-0.0068,0.0000,-0.0024),(-0.0073,0.0011,-0.0026),(-0.0017,-0.0012,-0.0025),(-0.0033,-0.0010,-0.0024),(-0.0032,-0.0007,-0.0027),(-0.0018,-0.0017,-0.0022),(-0.0040,-0.0009,0.0007),(-0.0008,0.0012,-0.0012),(-0.0025,0.0015,-0.0016),(-0.0010,0.0011,-0.0007),(-0.0025,0.0015,-0.0011),(-0.0055,0.0036,-0.0006),(-0.0055,0.0029,0.0000),(-0.0050,0.0032,-0.0005),(-0.0073,0.0021,-0.0003),(-0.0071,0.0010,0.0005),(-0.0070,0.0026,0.0000),(-0.0068,0.0016,0.0006),(-0.0073,0.0004,-0.0013),(-0.0068,-0.0003,-0.0016),(-0.0071,-0.0001,-0.0010),(-0.0070,0.0021,-0.0036),(-0.0063,0.0009,-0.0041),(-0.0073,0.0015,-0.0030),(-0.0068,0.0006,-0.0033),(-0.0073,0.0033,-0.0020),(-0.0068,0.0037,-0.0010),(-0.0068,0.0041,-0.0019),(-0.0073,0.0031,-0.0014),(-0.0048,-0.0004,-0.0035),(-0.0052,-0.0008,-0.0029),(-0.0076,0.0022,-0.0019),(-0.0053,0.0043,-0.0020),(-0.0048,0.0032,-0.0012),(-0.0045,0.0034,-0.0018),(-0.0055,0.0041,-0.0012),(-0.0060,-0.0007,-0.0022),(-0.0053,-0.0013,-0.0012),(-0.0053,-0.0011,-0.0020),(-0.0065,-0.0007,-0.0008),(-0.0073,0.0008,-0.0018),(0.0054,-0.0021,-0.0006),(0.0053,-0.0021,-0.0003),(0.0053,-0.0022,0.0001),(-0.0055,0.0039,-0.0029),(-0.0047,0.0028,-0.0032),(-0.0050,0.0034,-0.0035),(-0.0047,0.0032,-0.0024),(0.0016,-0.0002,0.0035),(0.0025,0.0008,0.0024),(0.0063,-0.0002,0.0003),(0.0063,-0.0006,-0.0002),(-0.0040,-0.0014,-0.0012),(-0.0040,-0.0015,-0.0005),(-0.0055,-0.0011,-0.0006),(0.0060,-0.0001,0.0009),(-0.0050,0.0010,0.0009),(-0.0030,0.0011,0.0004),(-0.0042,0.0021,0.0002),(-0.0035,0.0024,-0.0020),(-0.0035,0.0022,-0.0025),(-0.0060,0.0030,-0.0040),(-0.0060,0.0042,-0.0030),(0.0020,-0.0019,0.0037),(0.0013,-0.0032,0.0023),(0.0018,-0.0032,0.0027),(0.0013,-0.0019,0.0031),(-0.0063,0.0040,-0.0009),(-0.0063,0.0044,-0.0020),(0.0038,0.0007,-0.0021),(0.0054,0.0010,-0.0022),(0.0036,-0.0014,-0.0037),(0.0023,-0.0016,-0.0033),(-0.0037,0.0025,-0.0015),(-0.0038,0.0024,-0.0009),(-0.0063,0.0023,-0.0042),(-0.0058,0.0014,-0.0044),(-0.0065,0.0030,0.0000),(-0.0062,0.0021,0.0005),(-0.0071,0.0032,-0.0026),(-0.0023,-0.0021,-0.0001),(-0.0020,-0.0022,-0.0009),(-0.0027,0.0011,-0.0024),(-0.0010,0.0007,-0.0020),(-0.0027,0.0015,-0.0006),(-0.0012,0.0010,-0.0001),(0.0025,0.0012,0.0003),(0.0028,0.0012,-0.0005),(0.0011,0.0011,-0.0008),(0.0008,0.0009,-0.0002),(0.0053,0.0022,0.0005),(0.0056,0.0019,-0.0009),(0.0043,0.0017,-0.0007),(0.0038,0.0017,0.0004),(-0.0073,0.0002,-0.0005),(-0.0076,0.0010,-0.0012),(-0.0053,-0.0010,-0.0025),(-0.0038,-0.0013,-0.0017),(-0.0035,-0.0012,-0.0021),(-0.0048,0.0026,-0.0038),(0.0061,0.0017,0.0034),(0.0053,0.0019,0.0026),(0.0015,0.0004,0.0019),(0.0020,0.0009,0.0011),(0.0001,0.0006,0.0011),(0.0005,0.0008,0.0005),(-0.0013,0.0009,0.0005),(-0.0028,0.0014,0.0000),(0.0048,-0.0024,-0.0036),(0.0050,-0.0013,-0.0033),(0.0059,-0.0001,-0.0026),(0.0064,0.0006,-0.0018),(0.0043,0.0020,0.0016),(0.0063,-0.0013,-0.0027),(0.0063,-0.0013,-0.0029),(0.0063,-0.0011,-0.0028),(-0.0065,0.0027,-0.0040),(-0.0015,-0.0006,-0.0025),(-0.0055,-0.0009,-0.0025),(-0.0073,0.0005,-0.0001),(-0.0076,0.0015,-0.0019),(-0.0076,0.0014,-0.0008),(-0.0055,0.0004,0.0010),(-0.0066,0.0040,-0.0030),(0.0053,-0.0042,-0.0028),(0.0051,-0.0041,-0.0016),(0.0050,-0.0043,-0.0016),(0.0054,-0.0040,-0.0026),(0.0048,-0.0044,-0.0005),(0.0045,-0.0037,0.0011),(0.0043,-0.0039,0.0012),(0.0050,-0.0041,-0.0005),(0.0073,0.0003,-0.0015),(0.0076,0.0012,0.0001),(0.0073,0.0001,-0.0013),(0.0076,0.0014,0.0000),(0.0071,0.0017,0.0019),(0.0071,0.0019,0.0018),(0.0061,0.0016,0.0034),(0.0040,-0.0031,0.0027),(0.0038,-0.0020,0.0038),(0.0038,-0.0033,0.0028),(0.0041,-0.0019,0.0037),(0.0056,-0.0026,-0.0022),(0.0053,-0.0032,-0.0017),(0.0053,-0.0032,-0.0009),(0.0050,-0.0032,-0.0002),(0.0045,-0.0025,0.0020),(0.0048,-0.0029,0.0009),(0.0048,-0.0006,0.0031),(0.0045,-0.0017,0.0027),(0.0051,0.0003,0.0030),(0.0060,0.0008,0.0025),(0.0071,0.0006,0.0002),(0.0066,0.0010,0.0014),(0.0068,-0.0002,-0.0009),(0.0060,-0.0011,-0.0018),(0.0031,-0.0029,-0.0036),(0.0045,-0.0031,-0.0035),(0.0061,0.0020,0.0012),(0.0068,0.0017,-0.0004),(0.0040,-0.0042,-0.0017),(0.0028,-0.0037,-0.0031),(0.0041,-0.0040,-0.0029),(0.0028,-0.0042,-0.0017),(0.0033,-0.0039,0.0012),(0.0026,-0.0045,-0.0004),(0.0038,-0.0044,-0.0004),(0.0023,-0.0039,0.0012),(0.0030,-0.0032,0.0027),(0.0030,-0.0019,0.0037),(0.0031,0.0015,0.0014),(0.0021,-0.0027,-0.0032),(0.0013,-0.0034,-0.0023),(0.0013,-0.0025,-0.0026),(0.0020,-0.0036,-0.0028),(0.0023,0.0001,-0.0018),(0.0011,-0.0038,-0.0014),(0.0020,-0.0041,-0.0016),(0.0015,-0.0039,0.0010),(0.0010,-0.0040,-0.0005),(0.0018,-0.0044,-0.0004),(0.0008,-0.0036,0.0007),(0.0008,-0.0030,0.0018),(0.0008,-0.0017,0.0024),(0.0011,-0.0002,0.0025),(-0.0037,0.0019,-0.0032),(-0.0040,0.0024,-0.0003),(-0.0003,-0.0028,-0.0015),(-0.0003,-0.0025,-0.0022),(-0.0020,-0.0020,-0.0016),(-0.0008,-0.0023,0.0011),(-0.0005,-0.0028,0.0002),(-0.0002,-0.0018,-0.0024),(-0.0004,-0.0030,-0.0007),(0.0013,-0.0014,-0.0026),(-0.0000,-0.0010,-0.0024),(0.0005,0.0003,-0.0018),(-0.0007,-0.0011,0.0016),(-0.0002,0.0001,0.0016),(-0.0015,0.0006,0.0009),(-0.0053,0.0019,-0.0043),(-0.0057,-0.0003,0.0007)])))])])
)

### X3D model conversion complete ###

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

print('Self-test diagnostics for l_carpal_distal_phalanx_4.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 l_carpal_distal_phalanx_4.py load and self-test diagnostics complete.")
