####################################################################################################
#
# Invoking X3D model self-test:
#
#   $ python r_fibula.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_fibula.x3d',name='title'),
    meta(content='leg bone on lateral side of tibia, to which it is connected above and below',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='25 April 2026',name='modified'),
    meta(content='originals/lowleg.x3d',name='reference'),
    meta(content='https://en.wikipedia.org/wiki/Fibula',name='reference'),
    meta(content='https://en.wikipedia.org/wiki/Human_leg',name='reference'),
    meta(content='https://en.wikipedia.org/wiki/Human_leg#/media/File:Human_leg_bones_labeled.svg',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_fibula.x3d',name='identifier'),
    meta(content='../license.html',name='license')]),
  Scene=Scene(
    children=[
    WorldInfo(title='r_fibula.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_fibula LOA-5 (part of r_calf LOA-1)'),
    Transform(DEF='r_fibula',translation=(-0.1069,0.2434,-0.0601),
      children=[
      BooleanToggle(DEF='UserTouchState'),
      ROUTE(fromField='isActive',fromNode='UserTouchSensor',toField='set_boolean',toNode='UserTouchState'),
      Viewpoint(DEF='HiddenViewpoint',nearDistance=0.001,position=(0,0,0.6),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_fibula_geometry',coordIndex=[0,1,2,-1,0,3,1,-1,4,5,6,-1,4,7,5,-1,8,9,10,-1,11,12,13,-1,12,14,13,-1,15,16,17,-1,16,18,17,-1,19,20,21,-1,22,23,24,-1,23,25,24,-1,26,27,28,-1,29,30,31,-1,32,33,34,-1,32,35,33,-1,15,33,36,-1,37,38,39,-1,40,41,42,-1,43,44,45,-1,34,17,46,-1,34,33,17,-1,47,48,49,-1,47,50,48,-1,51,52,53,-1,52,54,53,-1,55,56,57,-1,56,58,57,-1,59,60,61,-1,62,63,64,-1,65,66,61,-1,64,56,62,-1,56,67,62,-1,68,69,70,-1,69,71,70,-1,72,73,74,-1,73,75,74,-1,76,77,78,-1,77,55,78,-1,79,80,81,-1,81,82,79,-1,83,84,85,-1,86,84,87,-1,86,81,84,-1,88,89,90,-1,89,91,90,-1,92,93,94,-1,93,95,94,-1,96,97,98,-1,80,99,84,-1,99,85,84,-1,100,101,102,-1,101,103,102,-1,104,99,105,-1,104,106,99,-1,107,108,109,-1,110,111,112,-1,110,113,111,-1,88,114,115,-1,88,90,114,-1,95,96,13,-1,96,116,13,-1,117,94,118,-1,94,14,118,-1,58,64,111,-1,58,56,64,-1,119,120,107,-1,107,121,119,-1,122,123,124,-1,125,126,127,-1,127,128,125,-1,129,130,131,-1,131,132,129,-1,133,134,135,-1,133,136,134,-1,137,138,139,-1,137,140,138,-1,124,141,142,-1,143,144,145,-1,143,146,144,-1,147,148,149,-1,148,150,149,-1,151,152,153,-1,154,155,156,-1,154,151,155,-1,157,144,131,-1,144,132,131,-1,158,159,160,-1,161,162,163,-1,163,164,161,-1,150,165,123,-1,150,166,165,-1,64,63,111,-1,63,112,111,-1,167,168,21,-1,167,169,168,-1,170,171,172,-1,171,51,172,-1,121,173,174,-1,121,175,173,-1,174,176,177,-1,174,0,176,-1,177,176,178,-1,178,179,177,-1,180,66,57,-1,66,65,57,-1,181,1,3,-1,182,181,183,-1,181,184,183,-1,185,163,162,-1,162,186,185,-1,68,187,184,-1,187,183,184,-1,188,189,187,-1,189,190,187,-1,191,192,193,-1,191,194,192,-1,195,189,196,-1,195,190,189,-1,197,198,195,-1,195,199,197,-1,200,201,202,-1,203,204,205,-1,204,206,205,-1,207,208,154,-1,208,151,154,-1,135,139,133,-1,135,209,139,-1,210,211,212,-1,212,142,210,-1,213,214,215,-1,216,215,217,-1,215,218,217,-1,79,110,105,-1,79,113,110,-1,83,219,100,-1,219,101,100,-1,102,103,220,-1,103,221,220,-1,89,222,223,-1,223,224,89,-1,223,101,224,-1,101,219,224,-1,225,226,106,-1,225,227,226,-1,228,95,93,-1,228,96,95,-1,229,230,231,-1,6,232,4,-1,233,234,235,-1,235,4,233,-1,235,236,237,-1,235,238,236,-1,239,240,241,-1,239,5,240,-1,20,242,243,-1,20,244,242,-1,245,40,42,-1,42,246,245,-1,247,44,43,-1,247,248,44,-1,26,233,249,-1,249,27,26,-1,248,250,44,-1,251,238,235,-1,235,234,251,-1,252,253,254,-1,253,255,254,-1,256,231,222,-1,256,257,231,-1,258,115,259,-1,259,260,258,-1,261,258,260,-1,260,262,261,-1,263,19,264,-1,264,265,263,-1,167,20,39,-1,167,21,20,-1,37,245,266,-1,37,243,245,-1,266,246,267,-1,266,245,246,-1,236,268,269,-1,236,238,268,-1,270,268,271,-1,272,32,31,-1,31,273,272,-1,253,274,275,-1,274,36,275,-1,253,252,276,-1,276,274,253,-1,43,277,247,-1,278,279,280,-1,280,18,278,-1,281,282,283,-1,273,31,30,-1,30,169,273,-1,29,284,30,-1,280,279,281,-1,279,282,281,-1,46,18,280,-1,46,17,18,-1,16,285,18,-1,286,278,287,-1,286,279,278,-1,274,276,285,-1,285,16,274,-1,255,275,288,-1,255,253,275,-1,251,271,268,-1,268,238,251,-1,246,236,269,-1,269,267,246,-1,38,37,266,-1,250,289,44,-1,250,25,289,-1,262,263,265,-1,262,260,263,-1,290,244,259,-1,290,242,244,-1,234,291,255,-1,255,251,234,-1,233,291,234,-1,233,26,291,-1,248,247,28,-1,28,27,248,-1,241,292,293,-1,241,240,292,-1,294,295,92,-1,295,93,92,-1,232,118,249,-1,118,296,249,-1,297,295,294,-1,297,298,295,-1,264,168,283,-1,283,282,264,-1,299,8,300,-1,299,301,8,-1,224,219,227,-1,219,226,227,-1,105,97,104,-1,105,110,97,-1,87,100,302,-1,124,123,141,-1,123,165,141,-1,147,149,203,-1,203,205,147,-1,202,303,200,-1,303,304,200,-1,305,143,193,-1,305,146,143,-1,193,192,185,-1,185,305,193,-1,189,306,307,-1,307,196,189,-1,182,1,181,-1,182,194,1,-1,70,59,308,-1,70,60,59,-1,184,309,68,-1,309,69,68,-1,2,176,0,-1,71,74,76,-1,74,77,76,-1,109,81,175,-1,81,86,175,-1,74,75,77,-1,75,67,77,-1,81,80,84,-1,104,97,96,-1,96,228,104,-1,223,103,101,-1,223,230,103,-1,158,310,159,-1,158,311,310,-1,164,163,312,-1,142,141,313,-1,313,210,142,-1,154,314,315,-1,154,156,314,-1,209,316,139,-1,316,315,139,-1,166,150,148,-1,317,318,319,-1,191,176,2,-1,191,178,176,-1,145,144,157,-1,147,205,320,-1,320,321,147,-1,133,141,136,-1,133,313,141,-1,148,152,166,-1,148,153,152,-1,322,138,140,-1,320,205,206,-1,126,125,323,-1,323,307,126,-1,211,217,218,-1,218,212,211,-1,310,311,123,-1,311,150,123,-1,323,324,325,-1,325,307,323,-1,129,132,314,-1,217,211,186,-1,129,317,130,-1,121,109,175,-1,121,107,109,-1,94,95,14,-1,95,13,14,-1,98,326,116,-1,116,96,98,-1,113,58,111,-1,113,327,58,-1,53,54,73,-1,54,50,73,-1,79,105,80,-1,105,99,80,-1,99,106,85,-1,106,226,85,-1,97,63,98,-1,97,112,63,-1,290,292,40,-1,40,242,290,-1,114,297,293,-1,114,90,297,-1,228,225,106,-1,106,104,228,-1,94,117,92,-1,117,239,92,-1,89,224,91,-1,112,97,110,-1,87,84,83,-1,83,100,87,-1,73,47,75,-1,73,50,47,-1,69,72,71,-1,72,74,71,-1,68,188,187,-1,56,55,67,-1,55,77,67,-1,59,306,308,-1,79,327,113,-1,79,82,327,-1,107,66,180,-1,180,108,107,-1,65,61,78,-1,51,53,328,-1,328,172,51,-1,52,220,54,-1,220,9,54,-1,27,250,248,-1,27,329,250,-1,287,289,286,-1,268,270,269,-1,39,38,167,-1,35,36,33,-1,35,275,36,-1,254,255,291,-1,229,22,330,-1,22,24,330,-1,33,15,17,-1,48,326,49,-1,48,301,326,-1,11,13,116,-1,116,299,11,-1,6,239,117,-1,6,5,239,-1,116,301,299,-1,301,116,326,-1,48,54,9,-1,48,50,54,-1,331,229,330,-1,230,229,331,-1,267,270,332,-1,269,270,267,-1,278,285,333,-1,278,18,285,-1,334,335,336,-1,334,300,335,-1,337,329,338,-1,329,337,250,-1,78,57,65,-1,57,78,55,-1,82,180,327,-1,82,108,180,-1,228,295,225,-1,228,93,295,-1,293,290,114,-1,290,293,292,-1,40,243,242,-1,243,40,245,-1,327,57,58,-1,327,180,57,-1,130,319,339,-1,319,130,317,-1,325,204,340,-1,325,324,204,-1,149,303,203,-1,304,303,149,-1,341,212,218,-1,122,212,341,-1,157,128,127,-1,157,342,128,-1,304,150,311,-1,150,304,149,-1,151,343,152,-1,151,208,343,-1,134,343,208,-1,134,344,343,-1,135,208,207,-1,135,134,208,-1,320,155,321,-1,318,155,320,-1,166,345,165,-1,345,166,152,-1,133,138,313,-1,139,138,133,-1,156,318,317,-1,155,318,156,-1,147,153,148,-1,153,147,321,-1,328,69,309,-1,72,69,328,-1,151,321,155,-1,153,321,151,-1,183,190,346,-1,187,190,183,-1,347,319,206,-1,347,339,319,-1,342,339,128,-1,342,130,339,-1,348,177,179,-1,177,348,119,-1,59,120,349,-1,120,59,61,-1,350,126,351,-1,350,127,126,-1,143,191,193,-1,178,191,143,-1,206,318,320,-1,318,206,319,-1,352,51,171,-1,52,51,352,-1,353,87,302,-1,87,353,86,-1,62,75,47,-1,75,62,67,-1,170,3,0,-1,172,3,170,-1,81,108,82,-1,108,81,109,-1,353,175,86,-1,353,173,175,-1,70,76,60,-1,70,71,76,-1,2,194,191,-1,2,1,194,-1,127,145,157,-1,350,145,127,-1,189,308,306,-1,188,308,189,-1,351,307,306,-1,351,126,307,-1,325,196,307,-1,354,196,325,-1,355,199,354,-1,199,355,356,-1,159,213,160,-1,159,214,213,-1,201,357,356,-1,201,160,357,-1,198,312,346,-1,312,198,164,-1,357,161,197,-1,161,357,358,-1,322,185,186,-1,322,305,185,-1,210,186,211,-1,186,210,322,-1,140,305,322,-1,305,140,146,-1,315,137,139,-1,315,314,137,-1,311,200,304,-1,158,200,311,-1,352,100,102,-1,302,100,352,-1,63,326,98,-1,49,326,63,-1,335,221,331,-1,335,10,221,-1,227,295,298,-1,227,225,295,-1,12,334,338,-1,334,12,11,-1,250,24,25,-1,250,337,24,-1,257,229,231,-1,22,229,257,-1,330,337,336,-1,330,24,337,-1,232,233,4,-1,233,232,249,-1,40,240,41,-1,40,292,240,-1,247,254,28,-1,247,252,254,-1,114,259,115,-1,114,290,259,-1,257,258,261,-1,257,256,258,-1,359,265,360,-1,265,359,262,-1,359,25,23,-1,359,289,25,-1,45,289,287,-1,44,289,45,-1,282,286,360,-1,279,286,282,-1,167,273,169,-1,167,38,273,-1,361,275,35,-1,288,275,361,-1,271,255,288,-1,255,271,251,-1,333,287,278,-1,333,45,287,-1,46,281,284,-1,280,281,46,-1,284,283,30,-1,284,281,283,-1,15,274,16,-1,274,15,36,-1,270,288,361,-1,270,271,288,-1,35,272,361,-1,32,272,35,-1,272,38,332,-1,38,272,273,-1,267,38,266,-1,267,332,38,-1,332,361,272,-1,361,332,270,-1,263,20,19,-1,263,244,20,-1,360,264,282,-1,360,265,264,-1,360,289,359,-1,289,360,286,-1,23,262,359,-1,261,262,23,-1,260,244,263,-1,259,244,260,-1,115,256,88,-1,115,258,256,-1,222,88,256,-1,89,88,222,-1,241,92,239,-1,92,241,294,-1,277,252,247,-1,277,276,252,-1,249,329,27,-1,249,296,329,-1,246,237,236,-1,42,237,246,-1,20,37,39,-1,20,243,37,-1,41,5,7,-1,240,5,41,-1,6,118,232,-1,118,6,117,-1,235,7,4,-1,235,237,7,-1,338,296,12,-1,338,329,296,-1,336,331,330,-1,336,335,331,-1,22,261,23,-1,257,261,22,-1,222,230,223,-1,231,230,222,-1,11,300,334,-1,300,11,299,-1,230,221,103,-1,221,230,331,-1,298,224,227,-1,298,91,224,-1,221,9,220,-1,9,221,10,-1,9,301,48,-1,9,8,301,-1,52,102,220,-1,102,52,352,-1,47,63,62,-1,47,49,63,-1,218,214,341,-1,214,218,215,-1,216,213,215,-1,216,358,213,-1,316,154,315,-1,154,316,207,-1,347,204,324,-1,204,347,206,-1,146,132,144,-1,146,140,132,-1,216,186,162,-1,217,186,216,-1,164,197,161,-1,164,198,197,-1,163,192,312,-1,192,163,185,-1,160,200,158,-1,201,200,160,-1,358,160,213,-1,358,357,160,-1,202,356,355,-1,201,356,202,-1,195,354,199,-1,195,196,354,-1,356,197,199,-1,356,357,197,-1,340,354,325,-1,354,340,355,-1,348,351,349,-1,348,350,351,-1,145,178,143,-1,179,178,145,-1,324,125,347,-1,324,323,125,-1,194,312,192,-1,194,182,312,-1,182,346,312,-1,182,183,346,-1,355,303,202,-1,355,340,303,-1,349,119,348,-1,120,119,349,-1,119,174,177,-1,119,121,174,-1,170,174,173,-1,170,0,174,-1,173,171,170,-1,171,173,353,-1,309,172,328,-1,3,172,309,-1,171,302,352,-1,171,353,302,-1,169,283,168,-1,169,30,283,-1,159,341,214,-1,159,310,341,-1,162,358,216,-1,162,161,358,-1,313,322,210,-1,313,138,322,-1,306,349,351,-1,349,306,59,-1,350,179,145,-1,179,350,348,-1,347,128,339,-1,347,125,128,-1,136,344,134,-1,344,136,345,-1,122,142,212,-1,122,124,142,-1,195,346,190,-1,195,198,346,-1,72,53,73,-1,72,328,53,-1,314,317,129,-1,317,314,156,-1,345,141,165,-1,345,136,141,-1,140,314,132,-1,314,140,137,-1,152,344,345,-1,343,344,152,-1,207,209,135,-1,207,316,209,-1,310,122,341,-1,123,122,310,-1,342,131,130,-1,342,157,131,-1,340,203,303,-1,340,204,203,-1,293,294,241,-1,297,294,293,-1,91,297,90,-1,91,298,297,-1,61,107,120,-1,61,66,107,-1,85,219,83,-1,85,226,219,-1,60,78,61,-1,60,76,78,-1,308,68,70,-1,308,188,68,-1,338,336,337,-1,338,334,336,-1,29,46,284,-1,29,34,46,-1,277,285,276,-1,277,333,285,-1,277,45,333,-1,277,43,45,-1,42,7,237,-1,41,7,42,-1,31,34,29,-1,31,32,34,-1,28,291,26,-1,28,254,291,-1,264,21,168,-1,264,19,21,-1,10,300,8,-1,10,335,300,-1,12,118,14,-1,12,296,118,-1,3,184,181,-1,3,309,184,-1],creaseAngle=1.571,
          coord=Coordinate(DEF='r_fibula_coordinate',point=[(0.0098,-0.0753,0.0033),(0.0080,-0.1012,-0.0024),(0.0111,-0.1012,0.0005),(0.0068,-0.0742,-0.0012),(-0.0036,0.1716,0.0104),(-0.0048,0.1661,0.0156),(-0.0049,0.1667,0.0133),(-0.0012,0.1729,0.0154),(-0.0005,0.0794,0.0056),(0.0004,0.0550,0.0031),(-0.0029,0.0796,0.0062),(-0.0029,0.1282,0.0091),(-0.0075,0.1488,0.0113),(-0.0014,0.1279,0.0092),(-0.0056,0.1485,0.0121),(-0.0159,0.1870,0.0126),(-0.0172,0.1859,0.0109),(-0.0174,0.1872,0.0136),(-0.0202,0.1843,0.0141),(-0.0126,0.1776,0.0314),(-0.0072,0.1759,0.0313),(-0.0119,0.1804,0.0312),(-0.0140,0.1493,0.0217),(-0.0160,0.1561,0.0224),(-0.0148,0.1501,0.0180),(-0.0160,0.1564,0.0179),(-0.0100,0.1734,0.0105),(-0.0114,0.1690,0.0115),(-0.0119,0.1743,0.0105),(-0.0155,0.1903,0.0228),(-0.0162,0.1926,0.0284),(-0.0134,0.1897,0.0232),(-0.0139,0.1874,0.0199),(-0.0142,0.1870,0.0144),(-0.0156,0.1877,0.0189),(-0.0122,0.1870,0.0149),(-0.0141,0.1874,0.0122),(-0.0036,0.1810,0.0308),(-0.0082,0.1845,0.0262),(-0.0058,0.1822,0.0323),(-0.0031,0.1714,0.0248),(-0.0019,0.1725,0.0209),(-0.0016,0.1729,0.0210),(-0.0180,0.1762,0.0102),(-0.0186,0.1715,0.0129),(-0.0197,0.1761,0.0115),(-0.0184,0.1883,0.0173),(0.0068,0.0269,-0.0042),(0.0043,0.0536,-0.0001),(0.0057,0.0528,-0.0019),(0.0055,0.0268,-0.0029),(0.0017,-0.0109,0.0047),(-0.0022,0.0260,0.0079),(0.0027,-0.0101,-0.0014),(0.0013,0.0265,0.0007),(0.0139,-0.0448,-0.0069),(0.0097,-0.0084,-0.0047),(0.0145,-0.0446,-0.0061),(0.0097,-0.0085,-0.0028),(0.0185,-0.1247,-0.0150),(0.0142,-0.0970,-0.0118),(0.0167,-0.0972,-0.0119),(0.0073,0.0268,-0.0035),(0.0063,0.0526,-0.0007),(0.0078,0.0265,-0.0024),(0.0167,-0.0712,-0.0090),(0.0166,-0.0714,-0.0082),(0.0083,-0.0086,-0.0056),(0.0118,-0.0967,-0.0129),(0.0090,-0.0718,-0.0106),(0.0129,-0.0965,-0.0123),(0.0102,-0.0715,-0.0105),(0.0076,-0.0455,-0.0088),(0.0064,-0.0089,-0.0063),(0.0092,-0.0453,-0.0090),(0.0076,-0.0086,-0.0066),(0.0132,-0.0713,-0.0091),(0.0112,-0.0453,-0.0072),(0.0163,-0.0712,-0.0093),(0.0070,0.0251,0.0055),(0.0069,0.0249,0.0067),(0.0136,-0.0127,0.0036),(0.0122,-0.0114,0.0019),(0.0032,0.0501,0.0121),(0.0072,0.0248,0.0082),(0.0033,0.0506,0.0106),(0.0096,-0.0086,0.0073),(0.0060,0.0215,0.0104),(-0.0081,0.1482,0.0222),(-0.0071,0.1283,0.0200),(-0.0075,0.1482,0.0208),(-0.0062,0.1284,0.0186),(-0.0050,0.1483,0.0144),(-0.0022,0.1283,0.0118),(-0.0049,0.1486,0.0129),(-0.0011,0.1281,0.0100),(0.0022,0.1047,0.0076),(0.0052,0.0790,0.0045),(0.0048,0.0792,0.0032),(0.0034,0.0510,0.0082),(0.0002,0.0499,0.0132),(-0.0041,0.0777,0.0156),(-0.0038,0.0516,0.0133),(-0.0072,0.0780,0.0151),(0.0043,0.0789,0.0064),(0.0045,0.0514,0.0064),(0.0010,0.0784,0.0086),(0.0172,-0.0717,-0.0066),(0.0158,-0.0441,-0.0030),(0.0165,-0.0438,-0.0017),(0.0050,0.0516,0.0034),(0.0066,0.0259,-0.0001),(0.0056,0.0521,0.0016),(0.0064,0.0254,0.0027),(-0.0077,0.1542,0.0219),(-0.0083,0.1536,0.0243),(0.0019,0.1049,0.0064),(-0.0053,0.1552,0.0137),(-0.0059,0.1552,0.0127),(0.0180,-0.0985,-0.0052),(0.0174,-0.0978,-0.0095),(0.0154,-0.0730,-0.0011),(0.0097,-0.1920,-0.0119),(0.0100,-0.1905,-0.0148),(0.0113,-0.1898,-0.0112),(0.0219,-0.1587,-0.0236),(0.0219,-0.1564,-0.0228),(0.0226,-0.1573,-0.0135),(0.0219,-0.1592,-0.0147),(0.0196,-0.1716,-0.0101),(0.0196,-0.1688,-0.0131),(0.0204,-0.1676,-0.0111),(0.0194,-0.1705,-0.0070),(0.0134,-0.1809,-0.0049),(0.0120,-0.1815,-0.0114),(0.0126,-0.1800,-0.0095),(0.0127,-0.1866,-0.0107),(0.0173,-0.1729,-0.0049),(0.0148,-0.1761,-0.0040),(0.0151,-0.1765,-0.0051),(0.0173,-0.1713,-0.0039),(0.0125,-0.1880,-0.0098),(0.0112,-0.1893,-0.0090),(0.0197,-0.1551,-0.0023),(0.0208,-0.1632,-0.0069),(0.0209,-0.1526,-0.0071),(0.0184,-0.1640,-0.0031),(0.0153,-0.1855,-0.0226),(0.0132,-0.1862,-0.0207),(0.0141,-0.1854,-0.0236),(0.0113,-0.1886,-0.0202),(0.0147,-0.1834,-0.0174),(0.0127,-0.1861,-0.0179),(0.0139,-0.1850,-0.0193),(0.0173,-0.1765,-0.0137),(0.0167,-0.1824,-0.0190),(0.0182,-0.1761,-0.0150),(0.0222,-0.1619,-0.0098),(0.0071,-0.1891,-0.0221),(0.0063,-0.1895,-0.0186),(0.0043,-0.1838,-0.0187),(0.0025,-0.1729,-0.0097),(0.0043,-0.1742,-0.0055),(0.0085,-0.1644,-0.0057),(0.0083,-0.1633,-0.0086),(0.0112,-0.1893,-0.0155),(0.0124,-0.1872,-0.0191),(-0.0084,0.1845,0.0330),(-0.0149,0.1829,0.0310),(-0.0139,0.1901,0.0303),(0.0071,-0.0477,0.0062),(0.0024,-0.0114,0.0089),(0.0049,-0.0471,0.0022),(0.0105,-0.0462,0.0057),(0.0142,-0.0746,0.0021),(0.0130,-0.0452,0.0033),(0.0139,-0.1011,0.0013),(0.0168,-0.1004,-0.0009),(0.0183,-0.1307,-0.0014),(0.0191,-0.1294,-0.0042),(0.0148,-0.0444,-0.0047),(0.0069,-0.1009,-0.0044),(0.0104,-0.1296,-0.0062),(0.0111,-0.1274,-0.0111),(0.0067,-0.1004,-0.0080),(0.0109,-0.1654,-0.0032),(0.0077,-0.1747,-0.0038),(0.0134,-0.1255,-0.0158),(0.0156,-0.1246,-0.0170),(0.0152,-0.1461,-0.0228),(0.0141,-0.1474,-0.0203),(0.0154,-0.1309,-0.0015),(0.0143,-0.1561,-0.0038),(0.0169,-0.1557,-0.0024),(0.0129,-0.1305,-0.0032),(0.0113,-0.1582,-0.0226),(0.0155,-0.1579,-0.0302),(0.0028,-0.1705,-0.0164),(0.0078,-0.1618,-0.0150),(0.0081,-0.1667,-0.0243),(0.0085,-0.1851,-0.0267),(0.0077,-0.1818,-0.0262),(0.0098,-0.1823,-0.0289),(0.0161,-0.1829,-0.0259),(0.0184,-0.1760,-0.0285),(0.0172,-0.1828,-0.0244),(0.0183,-0.1756,-0.0250),(0.0140,-0.1788,-0.0123),(0.0129,-0.1808,-0.0140),(0.0135,-0.1785,-0.0090),(0.0096,-0.1835,-0.0026),(0.0072,-0.1860,-0.0033),(0.0087,-0.1919,-0.0082),(0.0029,-0.1876,-0.0114),(0.0052,-0.1922,-0.0135),(0.0048,-0.1923,-0.0091),(0.0036,-0.1862,-0.0049),(0.0056,-0.1866,-0.0039),(0.0071,-0.1924,-0.0083),(-0.0007,0.0773,0.0152),(-0.0052,0.0534,0.0094),(-0.0073,0.0788,0.0116),(-0.0087,0.1281,0.0212),(-0.0066,0.1040,0.0177),(-0.0039,0.1046,0.0170),(-0.0007,0.1031,0.0111),(-0.0004,0.0777,0.0126),(-0.0023,0.1033,0.0140),(0.0004,0.1045,0.0093),(-0.0120,0.1288,0.0188),(-0.0096,0.1048,0.0168),(-0.0110,0.1285,0.0201),(-0.0050,0.1672,0.0119),(-0.0073,0.1724,0.0091),(-0.0064,0.1777,0.0081),(-0.0015,0.1749,0.0093),(-0.0001,0.1784,0.0157),(-0.0004,0.1743,0.0156),(-0.0012,0.1786,0.0125),(-0.0056,0.1551,0.0149),(-0.0053,0.1660,0.0195),(-0.0062,0.1549,0.0171),(-0.0059,0.1713,0.0290),(-0.0044,0.1757,0.0298),(-0.0080,0.1715,0.0314),(-0.0018,0.1743,0.0253),(-0.0011,0.1766,0.0208),(-0.0141,0.1757,0.0093),(-0.0152,0.1704,0.0111),(-0.0080,0.1680,0.0110),(-0.0135,0.1564,0.0133),(-0.0044,0.1823,0.0091),(-0.0132,0.1809,0.0074),(-0.0115,0.1850,0.0088),(-0.0104,0.1796,0.0087),(-0.0073,0.1840,0.0090),(-0.0102,0.1484,0.0237),(-0.0126,0.1489,0.0232),(-0.0101,0.1535,0.0256),(-0.0083,0.1641,0.0301),(-0.0118,0.1656,0.0306),(-0.0132,0.1544,0.0251),(-0.0159,0.1685,0.0279),(-0.0135,0.1727,0.0316),(-0.0159,0.1787,0.0307),(-0.0164,0.1736,0.0300),(-0.0021,0.1804,0.0269),(-0.0026,0.1808,0.0223),(-0.0032,0.1835,0.0141),(-0.0026,0.1826,0.0169),(-0.0067,0.1847,0.0167),(-0.0053,0.1850,0.0118),(-0.0122,0.1871,0.0208),(-0.0128,0.1885,0.0247),(-0.0141,0.1860,0.0086),(-0.0109,0.1870,0.0120),(-0.0147,0.1824,0.0065),(-0.0174,0.1779,0.0084),(-0.0216,0.1791,0.0162),(-0.0224,0.1825,0.0185),(-0.0212,0.1868,0.0175),(-0.0221,0.1895,0.0229),(-0.0223,0.1826,0.0245),(-0.0211,0.1896,0.0260),(-0.0186,0.1913,0.0222),(-0.0193,0.1838,0.0098),(-0.0226,0.1771,0.0192),(-0.0207,0.1773,0.0167),(-0.0085,0.1867,0.0119),(-0.0199,0.1716,0.0174),(-0.0071,0.1648,0.0265),(-0.0085,0.1787,0.0089),(-0.0058,0.1656,0.0225),(-0.0071,0.1548,0.0195),(-0.0054,0.1482,0.0157),(-0.0037,0.1283,0.0139),(-0.0082,0.1555,0.0114),(-0.0063,0.1481,0.0184),(-0.0048,0.1287,0.0160),(0.0000,0.1053,0.0069),(-0.0031,0.1055,0.0076),(0.0023,0.0793,0.0035),(0.0030,0.0243,0.0112),(0.0151,-0.1831,-0.0270),(0.0131,-0.1856,-0.0245),(0.0134,-0.1654,-0.0024),(0.0192,-0.1463,-0.0212),(0.0215,-0.1561,-0.0280),(0.0167,-0.1244,-0.0166),(0.0060,-0.0733,-0.0065),(0.0086,-0.1903,-0.0163),(0.0099,-0.1892,-0.0210),(0.0116,-0.1549,-0.0066),(0.0129,-0.1813,-0.0034),(0.0193,-0.1722,-0.0078),(0.0179,-0.1749,-0.0091),(0.0143,-0.1778,-0.0107),(0.0186,-0.1750,-0.0162),(0.0179,-0.1812,-0.0202),(0.0183,-0.1751,-0.0209),(0.0178,-0.1822,-0.0228),(0.0158,-0.1843,-0.0206),(0.0108,-0.1742,-0.0027),(0.0221,-0.1589,-0.0284),(0.0207,-0.1646,-0.0308),(0.0200,-0.1644,-0.0319),(0.0042,0.0790,0.0019),(0.0106,-0.0098,-0.0003),(0.0048,-0.0462,-0.0046),(-0.0103,0.1557,0.0118),(-0.0120,0.1296,0.0156),(-0.0099,0.1057,0.0138),(-0.0081,0.1843,0.0216),(-0.0203,0.1778,0.0106),(-0.0064,0.1288,0.0101),(-0.0063,0.1054,0.0086),(-0.0095,0.1292,0.0115),(-0.0127,0.1502,0.0136),(-0.0095,0.1493,0.0119),(0.0191,-0.1677,-0.0192),(0.0176,-0.1760,-0.0298),(0.0082,-0.1926,-0.0124),(0.0216,-0.1625,-0.0122),(0.0123,-0.1819,-0.0143),(0.0117,-0.1824,-0.0129),(0.0117,-0.1877,-0.0152),(0.0116,-0.1510,-0.0134),(0.0200,-0.1659,-0.0259),(0.0199,-0.1273,-0.0085),(0.0190,-0.1256,-0.0126),(0.0212,-0.1499,-0.0118),(0.0198,-0.1478,-0.0173),(-0.0013,0.0259,0.0116),(0.0060,-0.0104,0.0084),(0.0148,-0.1642,-0.0330),(0.0130,-0.1756,-0.0314),(0.0074,-0.1765,-0.0256),(0.0024,-0.1794,-0.0176),(0.0013,-0.1819,-0.0104),(-0.0199,0.1715,0.0240),(-0.0227,0.1768,0.0243),(-0.0102,0.1870,0.0155)])))])])
)

### X3D model conversion complete ###

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

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