####################################################################################################
#
# Invoking X3D model self-test:
#
#   $ python r_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='r_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/rdphal4.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/r_carpal_distal_phalanx_4.x3d',name='identifier'),
    meta(content='../license.html',name='license')]),
  Scene=Scene(
    children=[
    WorldInfo(title='r_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 r_carpal_distal_phalanx_4'),
    Transform(DEF='r_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='r_carpal_distal_phalanx_4_geometry',coordIndex=[0,1,2,-1,3,4,5,-1,6,7,8,-1,9,10,11,-1,9,12,10,-1,13,14,15,-1,16,17,18,-1,19,20,21,-1,20,22,21,-1,23,17,24,-1,25,17,26,-1,27,17,28,-1,29,30,31,-1,30,32,31,-1,33,34,35,-1,33,36,34,-1,37,7,0,-1,7,6,0,-1,38,39,40,-1,40,41,38,-1,42,43,44,-1,42,45,43,-1,0,2,37,-1,46,47,48,-1,49,50,51,-1,49,52,50,-1,53,54,55,-1,56,57,58,-1,56,59,57,-1,60,61,62,-1,61,63,62,-1,50,64,65,-1,50,52,64,-1,57,66,67,-1,57,59,66,-1,68,62,63,-1,69,70,71,-1,70,72,71,-1,73,74,75,-1,75,54,73,-1,76,54,53,-1,77,54,31,-1,78,17,79,-1,28,17,80,-1,81,82,83,-1,82,84,83,-1,85,17,86,-1,26,17,23,-1,73,87,88,-1,73,89,87,-1,90,17,25,-1,18,17,85,-1,19,21,91,-1,91,92,19,-1,93,8,94,-1,94,95,93,-1,46,48,72,-1,72,70,46,-1,96,43,97,-1,81,98,99,-1,81,83,98,-1,24,17,27,-1,29,54,75,-1,55,54,77,-1,100,101,102,-1,101,103,102,-1,104,105,106,-1,106,107,104,-1,108,70,109,-1,70,69,109,-1,64,7,37,-1,37,65,64,-1,57,110,111,-1,54,29,31,-1,48,47,112,-1,47,113,112,-1,84,97,109,-1,109,69,84,-1,114,98,71,-1,98,83,71,-1,68,115,62,-1,116,87,117,-1,116,88,87,-1,43,118,119,-1,119,44,43,-1,120,45,42,-1,42,121,120,-1,122,123,124,-1,124,125,122,-1,79,17,16,-1,86,17,90,-1,126,127,128,-1,128,129,126,-1,55,130,53,-1,55,131,130,-1,80,17,78,-1,81,132,82,-1,133,91,21,-1,133,134,91,-1,135,104,136,-1,137,105,138,-1,21,139,133,-1,21,22,139,-1,140,141,142,-1,143,111,99,-1,144,11,10,-1,145,146,66,-1,34,36,147,-1,3,130,148,-1,3,5,130,-1,66,147,36,-1,66,146,147,-1,32,59,56,-1,32,30,59,-1,149,150,68,-1,149,131,150,-1,52,94,64,-1,94,52,113,-1,61,112,49,-1,61,151,112,-1,152,114,60,-1,152,98,114,-1,99,152,143,-1,99,98,152,-1,14,142,141,-1,14,13,142,-1,153,154,155,-1,156,154,153,-1,157,158,159,-1,160,158,157,-1,161,162,163,-1,161,164,162,-1,165,134,166,-1,167,134,165,-1,91,168,92,-1,168,91,169,-1,170,171,172,-1,170,173,171,-1,79,174,175,-1,16,174,79,-1,80,176,177,-1,78,176,80,-1,178,28,179,-1,28,178,27,-1,180,24,181,-1,24,180,23,-1,25,182,183,-1,26,182,25,-1,184,90,185,-1,90,184,86,-1,142,186,163,-1,186,142,187,-1,175,13,156,-1,174,13,175,-1,177,153,160,-1,176,153,177,-1,171,179,157,-1,179,171,178,-1,168,181,173,-1,181,168,180,-1,183,169,167,-1,182,169,183,-1,161,185,165,-1,185,161,184,-1,188,136,104,-1,136,188,189,-1,128,133,139,-1,133,128,190,-1,191,105,137,-1,191,127,105,-1,135,105,104,-1,138,105,135,-1,192,193,194,-1,192,195,193,-1,196,197,198,-1,196,199,197,-1,102,200,100,-1,200,102,201,-1,189,14,136,-1,189,15,14,-1,124,202,203,-1,202,124,129,-1,204,205,206,-1,205,204,207,-1,106,123,208,-1,126,123,106,-1,207,209,210,-1,207,204,209,-1,38,211,212,-1,38,41,211,-1,213,103,101,-1,213,214,103,-1,215,216,217,-1,215,218,216,-1,219,43,96,-1,219,118,43,-1,108,220,221,-1,108,120,220,-1,222,121,223,-1,224,121,222,-1,22,202,139,-1,202,22,217,-1,96,132,219,-1,82,132,96,-1,172,197,200,-1,172,159,197,-1,225,204,226,-1,209,204,225,-1,227,147,228,-1,227,34,147,-1,74,145,75,-1,74,146,145,-1,131,77,150,-1,77,131,55,-1,76,130,5,-1,53,130,76,-1,1,89,4,-1,89,1,87,-1,229,117,0,-1,117,229,40,-1,211,100,199,-1,101,100,211,-1,166,191,164,-1,191,166,190,-1,206,226,204,-1,230,226,206,-1,189,154,15,-1,194,154,189,-1,231,230,206,-1,231,232,230,-1,122,208,123,-1,233,208,122,-1,203,125,124,-1,125,203,223,-1,234,218,214,-1,235,218,234,-1,236,220,224,-1,236,93,220,-1,119,11,144,-1,119,118,11,-1,116,228,88,-1,228,116,227,-1,115,60,62,-1,115,152,60,-1,69,83,84,-1,71,83,69,-1,97,45,109,-1,97,43,45,-1,132,99,237,-1,99,132,81,-1,12,57,67,-1,12,110,57,-1,65,148,50,-1,3,148,65,-1,46,95,47,-1,95,46,221,-1,82,97,84,-1,96,97,82,-1,19,170,201,-1,19,92,170,-1,0,234,229,-1,0,6,234,-1,120,109,45,-1,109,120,108,-1,212,199,196,-1,211,199,212,-1,198,159,158,-1,197,159,198,-1,40,116,117,-1,40,39,116,-1,36,67,66,-1,67,36,33,-1,232,35,230,-1,35,232,144,-1,200,170,172,-1,200,201,170,-1,235,224,222,-1,235,236,224,-1,236,234,6,-1,235,234,236,-1,118,9,11,-1,118,219,9,-1,95,220,93,-1,221,220,95,-1,151,48,112,-1,72,48,151,-1,105,126,106,-1,105,127,126,-1,20,217,22,-1,217,20,215,-1,190,134,133,-1,190,166,134,-1,162,138,140,-1,162,137,138,-1,68,58,115,-1,56,58,68,-1,51,68,63,-1,51,149,68,-1,164,137,162,-1,191,137,164,-1,129,139,202,-1,139,129,128,-1,119,232,233,-1,232,119,144,-1,44,233,122,-1,44,119,233,-1,141,136,14,-1,136,141,135,-1,16,187,174,-1,16,18,187,-1,107,188,104,-1,205,188,107,-1,65,2,3,-1,65,37,2,-1,54,89,73,-1,54,76,89,-1,193,158,155,-1,193,198,158,-1,210,196,195,-1,212,196,210,-1,225,116,39,-1,225,227,116,-1,72,114,71,-1,151,114,72,-1,42,223,121,-1,42,125,223,-1,74,88,228,-1,74,73,88,-1,215,102,103,-1,215,20,102,-1,219,237,9,-1,219,132,237,-1,113,95,94,-1,113,47,95,-1,49,63,61,-1,63,49,51,-1,115,143,152,-1,143,115,58,-1,33,12,67,-1,33,10,12,-1,50,149,51,-1,50,148,149,-1,125,44,122,-1,42,44,125,-1,35,10,33,-1,144,10,35,-1,8,236,6,-1,8,93,236,-1,218,222,216,-1,218,235,222,-1,233,231,208,-1,232,231,233,-1,39,209,225,-1,39,38,209,-1,229,214,213,-1,234,214,229,-1,205,192,188,-1,207,192,205,-1,230,34,226,-1,35,34,230,-1,213,40,229,-1,40,213,41,-1,87,0,117,-1,87,1,0,-1,5,89,76,-1,5,4,89,-1,32,77,31,-1,32,150,77,-1,30,75,145,-1,75,30,29,-1,146,228,147,-1,228,146,74,-1,226,227,225,-1,226,34,227,-1,192,210,195,-1,192,207,210,-1,194,155,154,-1,155,194,193,-1,223,216,222,-1,223,203,216,-1,224,120,121,-1,220,120,224,-1,70,221,46,-1,70,108,221,-1,217,203,202,-1,217,216,203,-1,103,218,215,-1,103,214,218,-1,41,101,211,-1,41,213,101,-1,209,212,210,-1,209,38,212,-1,208,107,106,-1,208,231,107,-1,123,129,124,-1,129,123,126,-1,206,107,231,-1,107,206,205,-1,111,58,57,-1,111,143,58,-1,141,138,135,-1,141,140,138,-1,20,201,102,-1,201,20,19,-1,200,199,100,-1,197,199,200,-1,195,198,193,-1,195,196,198,-1,190,127,191,-1,190,128,127,-1,188,194,189,-1,188,192,194,-1,163,184,161,-1,184,163,186,-1,185,167,165,-1,183,167,185,-1,182,168,169,-1,180,168,182,-1,173,178,171,-1,178,173,181,-1,157,177,160,-1,177,157,179,-1,176,156,153,-1,175,156,176,-1,174,142,13,-1,187,142,174,-1,186,86,184,-1,86,186,85,-1,90,183,185,-1,25,183,90,-1,26,180,182,-1,23,180,26,-1,181,27,178,-1,27,181,24,-1,179,80,177,-1,80,179,28,-1,78,175,176,-1,79,175,78,-1,187,85,186,-1,187,18,85,-1,172,157,159,-1,157,172,171,-1,92,173,170,-1,92,168,173,-1,167,91,134,-1,169,91,167,-1,164,165,166,-1,165,164,161,-1,163,140,142,-1,163,162,140,-1,160,155,158,-1,153,155,160,-1,156,15,154,-1,156,13,15,-1,9,110,12,-1,237,110,9,-1,111,237,99,-1,110,237,111,-1,151,60,114,-1,60,151,61,-1,49,113,52,-1,49,112,113,-1,94,7,64,-1,8,7,94,-1,150,56,68,-1,150,32,56,-1,59,145,66,-1,59,30,145,-1,131,148,130,-1,148,131,149,-1,2,4,3,-1,4,2,1,-1],creaseAngle=1.571,
          coord=Coordinate(DEF='r_carpal_distal_phalanx_4_coordinate',point=[(0.0023,-0.0018,0.0005),(0.0040,-0.0014,-0.0001),(0.0040,-0.0012,0.0003),(0.0058,-0.0007,0.0003),(0.0058,-0.0010,-0.0001),(0.0060,-0.0009,-0.0002),(0.0022,-0.0006,0.0010),(0.0038,-0.0004,0.0007),(0.0035,0.0002,0.0006),(0.0043,0.0009,-0.0037),(0.0030,-0.0003,-0.0027),(0.0028,0.0003,-0.0026),(0.0045,0.0003,-0.0038),(-0.0056,-0.0033,-0.0032),(-0.0056,-0.0032,-0.0034),(-0.0055,-0.0033,-0.0034),(-0.0055,-0.0018,-0.0009),(-0.0056,-0.0011,0.0004),(-0.0058,-0.0011,-0.0007),(-0.0033,-0.0004,0.0043),(-0.0025,-0.0003,0.0042),(-0.0041,0.0012,0.0039),(-0.0033,0.0010,0.0030),(-0.0051,-0.0009,0.0017),(-0.0050,-0.0014,0.0015),(-0.0058,-0.0001,0.0014),(-0.0053,-0.0004,0.0017),(-0.0050,-0.0018,0.0012),(-0.0051,-0.0020,0.0007),(0.0068,0.0000,-0.0024),(0.0070,0.0004,-0.0028),(0.0073,0.0004,-0.0022),(0.0073,0.0011,-0.0026),(0.0032,-0.0007,-0.0027),(0.0018,-0.0017,-0.0022),(0.0017,-0.0012,-0.0025),(0.0033,-0.0010,-0.0024),(0.0040,-0.0009,0.0007),(-0.0010,-0.0040,-0.0005),(0.0004,-0.0030,-0.0007),(0.0005,-0.0028,0.0002),(-0.0008,-0.0036,0.0007),(0.0010,0.0011,-0.0007),(0.0025,0.0015,-0.0016),(0.0008,0.0012,-0.0012),(0.0025,0.0015,-0.0011),(0.0050,0.0032,-0.0005),(0.0055,0.0029,0.0000),(0.0055,0.0036,-0.0006),(0.0070,0.0026,0.0000),(0.0071,0.0010,0.0005),(0.0073,0.0021,-0.0003),(0.0068,0.0016,0.0006),(0.0071,-0.0001,-0.0010),(0.0068,-0.0003,-0.0016),(0.0073,0.0004,-0.0013),(0.0073,0.0015,-0.0030),(0.0063,0.0009,-0.0041),(0.0070,0.0021,-0.0036),(0.0068,0.0006,-0.0033),(0.0068,0.0041,-0.0019),(0.0068,0.0037,-0.0010),(0.0073,0.0033,-0.0020),(0.0073,0.0031,-0.0014),(0.0055,0.0004,0.0010),(0.0057,-0.0003,0.0007),(0.0052,-0.0008,-0.0029),(0.0048,-0.0004,-0.0035),(0.0076,0.0022,-0.0019),(0.0045,0.0034,-0.0018),(0.0048,0.0032,-0.0012),(0.0053,0.0043,-0.0020),(0.0055,0.0041,-0.0012),(0.0053,-0.0013,-0.0012),(0.0053,-0.0011,-0.0020),(0.0060,-0.0007,-0.0022),(0.0065,-0.0007,-0.0008),(0.0073,0.0008,-0.0018),(-0.0053,-0.0021,-0.0003),(-0.0054,-0.0021,-0.0006),(-0.0053,-0.0022,0.0001),(0.0050,0.0034,-0.0035),(0.0047,0.0028,-0.0032),(0.0055,0.0039,-0.0029),(0.0047,0.0032,-0.0024),(-0.0063,-0.0006,-0.0002),(-0.0063,-0.0002,0.0003),(0.0040,-0.0015,-0.0005),(0.0040,-0.0014,-0.0012),(0.0055,-0.0011,-0.0006),(-0.0060,-0.0001,0.0009),(-0.0050,0.0010,0.0042),(-0.0043,-0.0005,0.0044),(0.0030,0.0011,0.0004),(0.0050,0.0010,0.0009),(0.0042,0.0021,0.0002),(0.0035,0.0022,-0.0025),(0.0035,0.0024,-0.0020),(0.0060,0.0042,-0.0030),(0.0060,0.0030,-0.0040),(-0.0018,-0.0032,0.0027),(-0.0013,-0.0032,0.0023),(-0.0020,-0.0019,0.0037),(-0.0013,-0.0019,0.0031),(-0.0036,-0.0014,-0.0037),(-0.0054,0.0010,-0.0022),(-0.0038,0.0007,-0.0021),(-0.0023,-0.0016,-0.0033),(0.0038,0.0024,-0.0009),(0.0037,0.0025,-0.0015),(0.0058,0.0014,-0.0044),(0.0063,0.0023,-0.0042),(0.0065,0.0030,0.0000),(0.0062,0.0021,0.0005),(0.0063,0.0044,-0.0020),(0.0071,0.0032,-0.0026),(0.0020,-0.0022,-0.0009),(0.0023,-0.0021,-0.0001),(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.0011,0.0011,-0.0008),(-0.0028,0.0012,-0.0005),(-0.0025,0.0012,0.0003),(-0.0008,0.0009,-0.0002),(-0.0043,0.0017,-0.0007),(-0.0056,0.0019,-0.0009),(-0.0053,0.0022,0.0005),(-0.0038,0.0017,0.0004),(0.0073,0.0002,-0.0005),(0.0076,0.0010,-0.0012),(0.0048,0.0026,-0.0038),(-0.0053,0.0019,0.0026),(-0.0061,0.0017,0.0034),(-0.0050,-0.0013,-0.0033),(-0.0048,-0.0024,-0.0036),(-0.0064,0.0006,-0.0018),(-0.0059,-0.0001,-0.0026),(-0.0043,0.0020,0.0016),(-0.0063,-0.0011,-0.0028),(-0.0063,-0.0013,-0.0029),(-0.0063,-0.0013,-0.0027),(0.0065,0.0027,-0.0040),(0.0015,-0.0006,-0.0025),(0.0055,-0.0009,-0.0025),(0.0053,-0.0010,-0.0025),(0.0035,-0.0012,-0.0021),(0.0073,0.0005,-0.0001),(0.0076,0.0014,-0.0008),(0.0076,0.0015,-0.0019),(0.0063,0.0040,-0.0009),(0.0066,0.0040,-0.0030),(-0.0051,-0.0041,-0.0016),(-0.0053,-0.0042,-0.0028),(-0.0050,-0.0043,-0.0016),(-0.0054,-0.0040,-0.0026),(-0.0045,-0.0037,0.0011),(-0.0048,-0.0044,-0.0005),(-0.0043,-0.0039,0.0012),(-0.0050,-0.0041,-0.0005),(-0.0076,0.0012,0.0001),(-0.0073,0.0003,-0.0015),(-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.0045,-0.0004,0.0043),(-0.0050,0.0009,0.0042),(-0.0038,-0.0020,0.0038),(-0.0040,-0.0031,0.0027),(-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.0028,-0.0037,-0.0031),(-0.0040,-0.0042,-0.0017),(-0.0041,-0.0040,-0.0029),(-0.0028,-0.0042,-0.0017),(-0.0026,-0.0045,-0.0004),(-0.0033,-0.0039,0.0012),(-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.0020,0.0009,0.0011),(-0.0013,-0.0034,-0.0023),(-0.0021,-0.0027,-0.0032),(-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.0018,-0.0044,-0.0004),(-0.0008,-0.0030,0.0018),(-0.0008,-0.0017,0.0024),(-0.0016,-0.0002,0.0035),(-0.0015,0.0004,0.0019),(-0.0025,0.0008,0.0024),(-0.0011,-0.0002,0.0025),(0.0037,0.0019,-0.0032),(0.0028,0.0014,0.0000),(0.0040,0.0024,-0.0003),(-0.0001,0.0006,0.0011),(-0.0005,0.0008,0.0005),(0.0013,0.0009,0.0005),(0.0003,-0.0028,-0.0015),(0.0003,-0.0025,-0.0022),(0.0020,-0.0020,-0.0016),(0.0038,-0.0013,-0.0017),(0.0008,-0.0023,0.0011),(0.0002,-0.0018,-0.0024),(-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)])))])])
)

### X3D model conversion complete ###

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

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