####################################################################################################
#
# Invoking X3D model self-test:
#
#   $ python r_carpal_proximal_phalanx_3.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_proximal_phalanx_3.x3d',name='title'),
    meta(content='bone in finger',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='30 May 2026',name='modified'),
    meta(content='originals/rpphal3.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_proximal_phalanx_3.x3d',name='identifier'),
    meta(content='../license.html',name='license')]),
  Scene=Scene(
    children=[
    WorldInfo(title='r_carpal_proximal_phalanx_3.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_proximal_phalanx_3'),
    Transform(DEF='r_carpal_proximal_phalanx_3',translation=(-0.2012,0.7447,0.0978),
      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',scale=(0.5,0.5,0.5),translation=(-0.012,0.018,0),visible=False,
        children=[
        Comment('computations follow from ComputeBoneOffsetsForJointCenters for parent joint center of rotation'),
        Comment('bone r_carpal_proximal_phalanx_3.x3d + translation -0.2012 +0.7447 +0.0978'),
        Comment('bone r_carpal_proximal_phalanx_3.x3d adjusted axes -0.0120 +0.0180 +0.0000'),
        Comment('bone r_carpal_proximal_phalanx_3.x3d =joint center -0.2132 +0.7627 +0.0978'),
        Inline(DEF='AxesDisplay',description='RGB display axes showing XYZ direction in local coordinate system',url=["AxesDisplay.x3d"])]),
      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_proximal_phalanx_3_geometry',coordIndex=[0,1,2,-1,3,4,5,-1,6,7,8,-1,6,9,7,-1,10,11,12,-1,13,14,15,-1,16,17,18,-1,19,20,21,-1,3,22,4,-1,23,24,25,-1,25,26,23,-1,27,28,29,-1,27,30,28,-1,31,32,25,-1,33,34,35,-1,35,36,33,-1,37,38,39,-1,38,40,39,-1,41,42,43,-1,41,44,45,-1,41,46,42,-1,41,47,48,-1,41,45,49,-1,41,50,51,-1,41,52,53,-1,41,54,44,-1,41,43,55,-1,56,57,58,-1,56,53,57,-1,59,60,61,-1,62,63,64,-1,65,66,67,-1,65,68,66,-1,69,70,71,-1,72,73,74,-1,74,75,72,-1,76,77,78,-1,78,79,76,-1,80,81,82,-1,82,4,80,-1,83,84,85,-1,84,18,85,-1,86,87,88,-1,87,89,88,-1,90,9,38,-1,9,6,38,-1,18,17,91,-1,92,5,93,-1,92,3,5,-1,94,95,96,-1,96,97,94,-1,31,28,98,-1,22,3,88,-1,31,29,28,-1,31,99,32,-1,31,100,101,-1,102,91,80,-1,102,103,91,-1,104,105,106,-1,106,103,102,-1,107,104,106,-1,12,30,10,-1,30,108,10,-1,11,109,110,-1,111,112,113,-1,111,114,112,-1,115,116,2,-1,115,117,116,-1,77,2,118,-1,2,116,118,-1,106,22,107,-1,106,119,103,-1,106,102,22,-1,105,120,106,-1,106,120,119,-1,80,4,22,-1,22,102,80,-1,17,121,122,-1,123,124,125,-1,123,126,124,-1,31,127,100,-1,31,101,99,-1,31,25,24,-1,31,98,127,-1,128,59,129,-1,129,130,128,-1,131,132,133,-1,131,134,132,-1,135,136,137,-1,94,97,138,-1,138,139,94,-1,21,16,84,-1,16,18,84,-1,26,78,140,-1,26,79,78,-1,141,126,142,-1,141,124,126,-1,92,115,86,-1,115,143,86,-1,72,79,73,-1,79,26,73,-1,144,145,140,-1,140,78,144,-1,141,146,124,-1,146,62,124,-1,62,147,63,-1,62,146,147,-1,59,148,60,-1,59,128,148,-1,54,149,150,-1,54,48,149,-1,41,51,52,-1,41,49,50,-1,41,56,46,-1,41,48,54,-1,41,53,56,-1,29,31,24,-1,151,4,82,-1,151,5,4,-1,151,82,152,-1,121,17,16,-1,47,41,55,-1,21,84,19,-1,110,153,11,-1,8,93,5,-1,8,7,93,-1,154,10,108,-1,122,155,156,-1,157,158,159,-1,158,157,160,-1,160,161,162,-1,161,160,157,-1,163,164,165,-1,163,166,164,-1,167,135,137,-1,167,168,135,-1,169,170,171,-1,169,13,170,-1,121,155,122,-1,171,155,121,-1,154,172,10,-1,173,172,154,-1,10,109,11,-1,10,172,109,-1,16,20,169,-1,16,21,20,-1,92,88,3,-1,86,88,92,-1,32,74,73,-1,74,32,99,-1,101,174,175,-1,174,101,100,-1,176,98,12,-1,176,127,98,-1,23,177,27,-1,177,23,178,-1,179,123,180,-1,179,181,123,-1,182,50,183,-1,51,50,182,-1,49,184,185,-1,49,45,184,-1,149,47,186,-1,48,47,149,-1,42,187,188,-1,42,46,187,-1,134,69,189,-1,134,131,69,-1,138,60,148,-1,138,97,60,-1,190,182,191,-1,182,190,192,-1,90,37,193,-1,90,38,37,-1,194,195,196,-1,194,197,195,-1,198,146,199,-1,146,198,147,-1,200,201,202,-1,203,201,200,-1,204,205,206,-1,205,204,207,-1,208,209,210,-1,208,211,209,-1,212,213,214,-1,215,213,212,-1,145,142,126,-1,144,142,145,-1,140,23,26,-1,140,178,23,-1,216,174,217,-1,216,175,174,-1,2,143,115,-1,1,143,2,-1,218,219,220,-1,218,221,219,-1,222,223,224,-1,222,225,223,-1,63,215,212,-1,215,63,147,-1,108,27,177,-1,27,108,30,-1,12,153,176,-1,12,11,153,-1,226,227,228,-1,226,229,227,-1,230,190,231,-1,230,232,190,-1,233,234,235,-1,233,191,234,-1,236,237,238,-1,236,239,237,-1,133,240,131,-1,133,241,240,-1,236,139,242,-1,236,94,139,-1,243,239,244,-1,235,239,243,-1,233,245,231,-1,233,246,245,-1,247,248,249,-1,247,135,248,-1,250,207,251,-1,209,207,250,-1,107,88,89,-1,107,22,88,-1,105,219,221,-1,105,104,219,-1,157,252,161,-1,253,252,157,-1,254,165,255,-1,254,162,165,-1,256,156,257,-1,256,258,156,-1,226,259,260,-1,226,230,259,-1,234,185,237,-1,183,185,234,-1,184,95,238,-1,184,261,95,-1,96,149,61,-1,150,149,96,-1,262,263,186,-1,262,241,263,-1,240,188,70,-1,264,188,240,-1,187,228,227,-1,187,58,228,-1,265,189,213,-1,265,134,189,-1,130,266,267,-1,130,132,266,-1,148,268,138,-1,268,148,224,-1,269,242,139,-1,270,242,269,-1,270,244,242,-1,270,271,244,-1,243,272,246,-1,273,272,243,-1,274,275,276,-1,275,274,214,-1,260,277,278,-1,260,259,277,-1,229,260,276,-1,260,229,226,-1,275,69,71,-1,275,189,69,-1,133,130,129,-1,132,130,133,-1,64,212,279,-1,212,64,63,-1,201,280,125,-1,280,201,203,-1,281,64,279,-1,281,202,64,-1,282,202,281,-1,282,200,202,-1,283,277,284,-1,282,277,283,-1,272,283,284,-1,272,251,283,-1,207,283,251,-1,207,204,283,-1,248,206,205,-1,206,248,285,-1,271,286,287,-1,271,270,286,-1,250,210,209,-1,250,287,210,-1,270,288,286,-1,269,288,270,-1,40,33,65,-1,33,40,34,-1,289,194,112,-1,197,194,289,-1,290,198,196,-1,198,290,291,-1,292,193,225,-1,195,193,292,-1,293,67,288,-1,67,293,39,-1,293,224,223,-1,293,268,224,-1,290,267,266,-1,292,267,290,-1,291,266,265,-1,290,266,291,-1,177,167,108,-1,177,179,167,-1,179,168,167,-1,179,180,168,-1,168,280,285,-1,180,280,168,-1,294,220,87,-1,294,295,220,-1,296,82,81,-1,296,152,82,-1,119,85,18,-1,119,120,85,-1,120,221,85,-1,120,105,221,-1,33,258,256,-1,258,33,36,-1,258,152,296,-1,258,36,152,-1,256,65,33,-1,68,65,256,-1,156,296,122,-1,296,156,258,-1,297,135,247,-1,297,136,135,-1,7,289,298,-1,289,7,9,-1,298,93,7,-1,298,117,93,-1,116,111,118,-1,114,111,116,-1,77,144,78,-1,77,118,144,-1,1,294,143,-1,1,166,294,-1,164,76,299,-1,76,164,0,-1,255,164,299,-1,255,165,164,-1,217,254,216,-1,217,300,254,-1,153,300,217,-1,110,300,153,-1,294,163,295,-1,166,163,294,-1,253,159,19,-1,253,157,159,-1,141,199,146,-1,141,113,199,-1,194,113,112,-1,194,199,113,-1,83,19,84,-1,83,253,19,-1,218,253,83,-1,218,252,253,-1,110,160,300,-1,110,158,160,-1,216,255,75,-1,216,254,255,-1,255,72,75,-1,255,299,72,-1,79,299,76,-1,79,72,299,-1,92,117,115,-1,117,92,93,-1,144,111,142,-1,144,118,111,-1,114,117,298,-1,114,116,117,-1,112,298,289,-1,112,114,298,-1,113,142,111,-1,142,113,141,-1,109,158,110,-1,15,158,109,-1,171,297,155,-1,297,171,170,-1,136,154,137,-1,136,173,154,-1,247,155,297,-1,155,247,156,-1,156,249,257,-1,156,247,249,-1,135,285,248,-1,135,168,285,-1,35,152,36,-1,152,35,151,-1,91,119,18,-1,103,119,91,-1,122,81,17,-1,122,296,81,-1,126,181,145,-1,126,123,181,-1,178,145,181,-1,140,145,178,-1,265,215,291,-1,265,213,215,-1,225,267,292,-1,222,267,225,-1,268,288,269,-1,288,268,293,-1,223,39,293,-1,37,39,223,-1,196,292,290,-1,196,195,292,-1,291,147,198,-1,147,291,215,-1,289,90,197,-1,9,90,289,-1,66,288,67,-1,286,288,66,-1,66,287,286,-1,287,66,210,-1,273,287,250,-1,271,287,273,-1,211,257,249,-1,211,208,257,-1,204,282,283,-1,282,204,200,-1,251,273,250,-1,272,273,251,-1,285,203,206,-1,203,285,280,-1,278,282,281,-1,278,277,282,-1,281,274,278,-1,279,274,281,-1,125,62,201,-1,124,62,125,-1,214,279,212,-1,214,274,279,-1,276,71,229,-1,276,275,71,-1,259,284,277,-1,284,259,245,-1,278,276,260,-1,276,278,274,-1,284,246,272,-1,284,245,246,-1,244,273,243,-1,271,273,244,-1,139,268,269,-1,268,139,138,-1,263,59,61,-1,263,129,59,-1,222,130,267,-1,222,128,130,-1,266,134,265,-1,266,132,134,-1,57,52,192,-1,53,52,57,-1,227,188,187,-1,188,227,70,-1,241,264,240,-1,262,264,241,-1,61,186,263,-1,149,186,61,-1,261,96,95,-1,261,150,96,-1,238,185,184,-1,185,238,237,-1,183,191,182,-1,183,234,191,-1,220,252,218,-1,252,220,295,-1,257,68,256,-1,208,68,257,-1,300,162,254,-1,300,160,162,-1,161,295,163,-1,252,295,161,-1,104,89,219,-1,104,107,89,-1,87,143,294,-1,87,86,143,-1,205,249,248,-1,249,205,211,-1,230,245,259,-1,230,231,245,-1,246,235,243,-1,233,235,246,-1,242,239,236,-1,239,242,244,-1,70,229,71,-1,227,229,70,-1,129,241,133,-1,129,263,241,-1,238,94,236,-1,94,238,95,-1,235,237,239,-1,235,234,237,-1,231,191,233,-1,231,190,191,-1,228,230,226,-1,228,232,230,-1,151,8,5,-1,35,8,151,-1,136,170,173,-1,136,297,170,-1,224,128,222,-1,224,148,128,-1,193,223,225,-1,37,223,193,-1,6,35,34,-1,8,35,6,-1,219,87,220,-1,87,219,89,-1,83,221,218,-1,83,85,221,-1,80,17,81,-1,80,91,17,-1,77,0,2,-1,76,0,77,-1,175,75,74,-1,216,75,175,-1,217,176,153,-1,217,174,176,-1,214,189,275,-1,214,213,189,-1,39,65,67,-1,65,39,40,-1,68,210,66,-1,68,208,210,-1,211,207,209,-1,211,205,207,-1,206,200,204,-1,206,203,200,-1,202,62,64,-1,201,62,202,-1,199,196,198,-1,199,194,196,-1,193,197,90,-1,197,193,195,-1,58,232,228,-1,58,57,232,-1,232,192,190,-1,232,57,192,-1,60,96,61,-1,97,96,60,-1,69,240,70,-1,131,240,69,-1,46,58,187,-1,46,56,58,-1,188,43,42,-1,43,188,264,-1,186,55,262,-1,186,47,55,-1,45,261,184,-1,45,44,261,-1,183,49,185,-1,50,49,183,-1,192,51,182,-1,52,51,192,-1,44,150,261,-1,150,44,54,-1,43,262,55,-1,264,262,43,-1,38,34,40,-1,38,6,34,-1,180,125,280,-1,180,123,125,-1,177,181,179,-1,177,178,181,-1,27,24,23,-1,27,29,24,-1,98,30,12,-1,98,28,30,-1,174,127,176,-1,174,100,127,-1,99,175,74,-1,175,99,101,-1,25,73,26,-1,73,25,32,-1,14,19,159,-1,14,20,19,-1,14,169,20,-1,169,14,13,-1,137,108,167,-1,154,108,137,-1,169,121,16,-1,121,169,171,-1,173,13,172,-1,170,13,173,-1,166,0,164,-1,1,0,166,-1,163,162,161,-1,163,165,162,-1,159,15,14,-1,159,158,15,-1,172,15,109,-1,15,172,13,-1],creaseAngle=1.571,
          coord=Coordinate(DEF='r_carpal_proximal_phalanx_3_coordinate',point=[(0.0107,-0.0138,-0.0005),(0.0107,-0.0139,-0.0008),(0.0104,-0.0139,-0.0005),(0.0080,-0.0152,-0.0055),(0.0070,-0.0158,-0.0050),(0.0067,-0.0140,-0.0048),(0.0000,-0.0028,-0.0046),(0.0049,-0.0109,-0.0041),(0.0045,-0.0110,-0.0040),(0.0005,-0.0026,-0.0042),(0.0107,-0.0193,0.0042),(0.0111,-0.0197,0.0041),(0.0112,-0.0195,0.0045),(0.0082,-0.0191,0.0010),(0.0085,-0.0196,0.0008),(0.0086,-0.0196,0.0010),(0.0083,-0.0200,-0.0027),(0.0073,-0.0192,-0.0033),(0.0099,-0.0204,-0.0044),(0.0108,-0.0203,-0.0021),(0.0084,-0.0200,-0.0013),(0.0086,-0.0204,-0.0027),(0.0088,-0.0162,-0.0057),(0.0112,-0.0134,0.0053),(0.0120,-0.0148,0.0047),(0.0126,-0.0144,0.0046),(0.0123,-0.0123,0.0047),(0.0102,-0.0146,0.0056),(0.0113,-0.0169,0.0049),(0.0114,-0.0155,0.0050),(0.0103,-0.0172,0.0050),(0.0127,-0.0162,0.0044),(0.0139,-0.0145,0.0042),(-0.0023,-0.0037,-0.0039),(-0.0010,-0.0032,-0.0044),(0.0039,-0.0113,-0.0039),(0.0031,-0.0115,-0.0034),(-0.0051,0.0085,-0.0067),(-0.0033,0.0040,-0.0056),(-0.0075,0.0075,-0.0063),(-0.0050,0.0033,-0.0051),(-0.0104,0.0168,0.0000),(-0.0091,0.0176,0.0007),(-0.0090,0.0176,0.0001),(-0.0113,0.0162,-0.0014),(-0.0117,0.0160,-0.0008),(-0.0093,0.0176,0.0011),(-0.0096,0.0172,-0.0013),(-0.0101,0.0169,-0.0016),(-0.0119,0.0159,-0.0002),(-0.0118,0.0161,0.0005),(-0.0115,0.0163,0.0011),(-0.0109,0.0166,0.0015),(-0.0104,0.0170,0.0017),(-0.0106,0.0166,-0.0016),(-0.0091,0.0175,-0.0007),(-0.0098,0.0173,0.0015),(-0.0105,0.0174,0.0034),(-0.0095,0.0181,0.0030),(-0.0087,0.0181,-0.0065),(-0.0091,0.0179,-0.0067),(-0.0091,0.0181,-0.0063),(0.0009,0.0066,0.0043),(-0.0001,0.0111,0.0041),(-0.0004,0.0111,0.0048),(-0.0067,0.0026,-0.0045),(-0.0115,0.0061,-0.0030),(-0.0097,0.0067,-0.0054),(-0.0084,0.0019,-0.0029),(-0.0059,0.0205,0.0017),(-0.0066,0.0205,0.0019),(-0.0060,0.0207,0.0022),(0.0148,-0.0128,0.0034),(0.0148,-0.0129,0.0038),(0.0161,-0.0145,0.0037),(0.0161,-0.0146,0.0033),(0.0116,-0.0127,0.0019),(0.0113,-0.0127,0.0021),(0.0119,-0.0120,0.0044),(0.0124,-0.0122,0.0043),(0.0068,-0.0174,-0.0046),(0.0061,-0.0171,-0.0040),(0.0062,-0.0155,-0.0046),(0.0118,-0.0200,-0.0053),(0.0101,-0.0207,-0.0041),(0.0115,-0.0198,-0.0055),(0.0094,-0.0147,-0.0060),(0.0110,-0.0155,-0.0066),(0.0092,-0.0151,-0.0062),(0.0108,-0.0158,-0.0067),(-0.0026,0.0043,-0.0052),(0.0080,-0.0192,-0.0041),(0.0086,-0.0146,-0.0054),(0.0072,-0.0138,-0.0048),(-0.0146,0.0159,-0.0057),(-0.0145,0.0161,-0.0054),(-0.0119,0.0171,-0.0063),(-0.0119,0.0170,-0.0066),(0.0118,-0.0177,0.0046),(0.0146,-0.0153,0.0041),(0.0143,-0.0178,0.0041),(0.0148,-0.0164,0.0040),(0.0084,-0.0174,-0.0051),(0.0088,-0.0186,-0.0048),(0.0110,-0.0174,-0.0063),(0.0114,-0.0182,-0.0061),(0.0099,-0.0177,-0.0056),(0.0102,-0.0166,-0.0063),(0.0099,-0.0172,0.0048),(0.0097,-0.0195,0.0032),(0.0122,-0.0197,0.0025),(0.0076,-0.0096,0.0026),(0.0020,-0.0021,-0.0002),(0.0031,-0.0013,0.0021),(0.0068,-0.0102,0.0001),(0.0096,-0.0142,-0.0034),(0.0087,-0.0125,-0.0001),(0.0079,-0.0132,-0.0029),(0.0096,-0.0118,0.0025),(0.0100,-0.0193,-0.0049),(0.0111,-0.0191,-0.0055),(0.0073,-0.0191,-0.0025),(0.0050,-0.0163,-0.0020),(0.0069,-0.0092,0.0054),(0.0036,-0.0005,0.0045),(0.0025,-0.0009,0.0052),(0.0078,-0.0087,0.0051),(0.0130,-0.0183,0.0043),(-0.0079,0.0175,-0.0071),(-0.0073,0.0185,-0.0049),(-0.0067,0.0180,-0.0051),(-0.0058,0.0200,0.0002),(-0.0060,0.0186,-0.0021),(-0.0064,0.0191,-0.0021),(-0.0049,0.0195,0.0001),(0.0029,-0.0119,0.0036),(0.0067,-0.0159,0.0033),(0.0070,-0.0152,0.0043),(-0.0117,0.0163,-0.0074),(-0.0145,0.0150,-0.0060),(0.0119,-0.0121,0.0048),(0.0038,-0.0005,0.0040),(0.0080,-0.0087,0.0047),(0.0100,-0.0141,-0.0036),(0.0101,-0.0111,0.0046),(0.0100,-0.0112,0.0050),(0.0009,0.0066,0.0036),(-0.0003,0.0111,0.0030),(-0.0088,0.0172,-0.0077),(-0.0099,0.0172,-0.0032),(-0.0111,0.0167,-0.0033),(0.0061,-0.0142,-0.0046),(0.0055,-0.0145,-0.0042),(0.0129,-0.0198,0.0039),(0.0092,-0.0177,0.0043),(0.0054,-0.0166,-0.0010),(0.0017,-0.0126,-0.0006),(0.0126,-0.0189,-0.0008),(0.0113,-0.0196,0.0001),(0.0111,-0.0196,-0.0001),(0.0127,-0.0189,-0.0005),(0.0135,-0.0174,-0.0015),(0.0136,-0.0173,-0.0012),(0.0133,-0.0160,-0.0016),(0.0126,-0.0147,-0.0012),(0.0134,-0.0160,-0.0014),(0.0125,-0.0148,-0.0014),(0.0073,-0.0144,0.0049),(0.0045,-0.0109,0.0052),(0.0079,-0.0195,-0.0014),(0.0078,-0.0186,0.0010),(0.0073,-0.0189,-0.0014),(0.0093,-0.0190,0.0033),(0.0087,-0.0183,0.0033),(0.0151,-0.0186,0.0038),(0.0162,-0.0167,0.0037),(0.0131,-0.0195,0.0042),(0.0098,-0.0142,0.0057),(0.0108,-0.0131,0.0054),(0.0079,-0.0126,0.0056),(0.0058,-0.0098,0.0056),(0.0091,-0.0117,0.0054),(-0.0125,0.0160,0.0022),(-0.0132,0.0155,0.0010),(-0.0132,0.0154,-0.0017),(-0.0136,0.0153,-0.0005),(-0.0088,0.0177,-0.0027),(-0.0084,0.0186,0.0021),(-0.0079,0.0188,0.0013),(-0.0043,0.0200,0.0017),(-0.0131,0.0173,0.0058),(-0.0146,0.0159,0.0044),(-0.0116,0.0166,0.0030),(-0.0042,0.0089,-0.0061),(-0.0012,0.0050,-0.0008),(-0.0033,0.0092,-0.0042),(-0.0027,0.0097,-0.0013),(-0.0020,0.0047,-0.0035),(-0.0014,0.0105,0.0010),(0.0000,0.0056,0.0016),(-0.0054,0.0088,0.0069),(-0.0009,0.0058,0.0056),(-0.0026,0.0102,0.0062),(-0.0033,0.0045,0.0063),(-0.0084,0.0075,0.0064),(-0.0076,0.0026,0.0045),(-0.0058,0.0033,0.0059),(-0.0102,0.0065,0.0049),(-0.0091,0.0014,-0.0004),(-0.0115,0.0059,0.0025),(-0.0120,0.0056,-0.0006),(-0.0087,0.0018,0.0024),(-0.0010,0.0147,0.0038),(-0.0027,0.0181,0.0020),(-0.0025,0.0182,0.0034),(-0.0012,0.0146,0.0025),(0.0162,-0.0168,0.0033),(0.0150,-0.0188,0.0034),(0.0125,-0.0184,-0.0063),(0.0119,-0.0171,-0.0069),(0.0122,-0.0169,-0.0067),(0.0121,-0.0184,-0.0065),(-0.0068,0.0157,-0.0074),(-0.0065,0.0124,-0.0077),(-0.0078,0.0154,-0.0081),(-0.0056,0.0128,-0.0071),(-0.0086,0.0199,0.0053),(-0.0073,0.0205,0.0032),(-0.0089,0.0198,0.0049),(-0.0067,0.0206,0.0036),(-0.0109,0.0186,0.0067),(-0.0131,0.0171,0.0062),(-0.0111,0.0186,0.0061),(-0.0148,0.0156,0.0046),(-0.0155,0.0149,0.0023),(-0.0157,0.0146,0.0024),(-0.0159,0.0150,-0.0034),(-0.0160,0.0146,-0.0006),(-0.0157,0.0152,-0.0032),(-0.0162,0.0143,-0.0006),(-0.0064,0.0200,0.0003),(-0.0069,0.0190,-0.0019),(-0.0160,0.0140,-0.0035),(-0.0157,0.0140,0.0025),(-0.0162,0.0135,-0.0006),(-0.0128,0.0161,0.0067),(-0.0146,0.0148,0.0049),(0.0020,-0.0124,0.0017),(-0.0033,-0.0039,0.0042),(-0.0044,-0.0045,0.0022),(-0.0135,0.0092,0.0027),(-0.0123,0.0100,0.0052),(0.0132,-0.0180,-0.0038),(0.0124,-0.0195,-0.0029),(0.0151,-0.0171,0.0011),(0.0149,-0.0150,0.0010),(-0.0039,-0.0042,-0.0027),(-0.0046,-0.0045,-0.0004),(0.0023,-0.0122,-0.0024),(-0.0100,0.0178,0.0074),(-0.0074,0.0192,0.0064),(-0.0124,0.0161,-0.0028),(-0.0080,0.0183,-0.0014),(-0.0077,0.0186,-0.0045),(-0.0078,0.0187,0.0001),(-0.0036,0.0177,0.0001),(-0.0049,0.0170,-0.0022),(-0.0055,0.0160,-0.0052),(-0.0107,0.0142,-0.0078),(-0.0137,0.0127,-0.0062),(-0.0152,0.0120,-0.0034),(-0.0156,0.0118,-0.0006),(-0.0138,0.0128,0.0053),(-0.0150,0.0121,0.0026),(-0.0032,0.0180,0.0049),(-0.0041,0.0202,0.0030),(-0.0049,0.0201,0.0043),(-0.0086,0.0158,0.0081),(-0.0057,0.0171,0.0070),(-0.0017,0.0148,0.0050),(0.0003,-0.0018,0.0059),(-0.0042,0.0138,0.0068),(-0.0071,0.0125,0.0076),(-0.0103,0.0110,0.0069),(-0.0120,0.0141,0.0072),(-0.0016,-0.0028,0.0057),(-0.0137,0.0093,-0.0031),(-0.0141,0.0089,-0.0007),(-0.0121,0.0104,-0.0058),(0.0010,-0.0024,-0.0029),(-0.0038,0.0136,-0.0018),(-0.0023,0.0141,0.0005),(-0.0044,0.0130,-0.0049),(-0.0094,0.0113,-0.0074),(0.0119,-0.0152,-0.0042),(0.0131,-0.0166,-0.0042),(0.0049,-0.0154,-0.0032),(0.0060,-0.0166,0.0012),(0.0058,-0.0108,-0.0024),(0.0139,-0.0136,0.0011),(0.0141,-0.0188,0.0017)])))])])
)

### X3D model conversion complete ###

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

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