####################################################################################################
#
# Invoking X3D model self-test:
#
#   $ python RedPlayer.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='Immersive',version='3.0',
  head=head(
    children=[
    meta(content='RedPlayer.x3d',name='title'),
    meta(content='Red player is the goalkeepr',name='description'),
    meta(content='Ignazio Locatelli, Bergamo, Italia LT Christos Kalogrias - Hellenic Navy',name='creator'),
    meta(content='15 August 2003',name='created'),
    meta(content='20 October 2019',name='modified'),
    meta(content='http://www.lucia.it/vrml/group/home/ignazio/vmhome.html',name='reference'),
    meta(content='http://www.lucia.it/vrml/projects/frank/frank_e.html',name='reference'),
    meta(content='https://www.web3d.org/x3d/content/examples/Savage/Buildings/SoccerStadium/RedPlayer.x3d',name='identifier'),
    meta(content='https://www.web3d.org/x3d/content/README.X3D-Edit.html',name='generator'),
    meta(content='../../license.html',name='license')]),
  Scene=Scene(
    children=[
    WorldInfo(title='RedPlayer.x3d'),
    Transform(DEF='Scala_Complessiva',scale=(0.0107,0.0107,0.0107),
      children=[
      Comment('This is Frank\'s holle body.'),
      Transform(DEF='parte_superiore',translation=(-8.4,101.0,-23.765),
        children=[
        Comment('This is the upper part'),
        Transform(DEF='busto_x',rotation=(1.0,0.0,0.0,0.05),
          children=[
          Transform(DEF='busto_y',
            children=[
            Transform(DEF='busto_z',
              children=[
              Transform(DEF='torace',scale=(0.84,3.0,0.84),
                children=[
                Comment('Main Body'),
                Shape(DEF='blocco',
                   # One peace of the main body. It has four

                  appearance=Appearance(
                    material=Material(diffuseColor=(1,0,0))),
                  geometry=IndexedFaceSet(coordIndex=[1,0,6,7,-1,2,1,7,8,-1,3,2,8,9,-1,4,3,9,10,-1,5,4,10,11,-1,0,5,11,6,-1,0,1,2,3,4,5,-1,11,10,9,8,7,6,-1],creaseAngle=3.0,
                    coord=Coordinate(point=[(-14.85,2.673,6.2055),(-7.425,2.673,14.22),(7.425,2.673,14.22),(14.85,2.673,6.2055),(7.425,2.673,-1.809),(-7.425,2.673,-1.809),(-14.4,0.0,5.8405),(-7.2,0.0,13.49),(7.2,0.0,13.49),(14.4,0.0,5.8405),(7.2,0.0,-1.509),(-7.2,0.0,-1.509)]))),
                Transform(scale=(1.05,1.4,1.05),translation=(0.0,2.6,0.0),
                  children=[
                  Shape(USE='blocco'),
                  Transform(scale=(1.05,1.3,1.05),translation=(0.0,2.6,0.0),
                    children=[
                    Shape(USE='blocco'),
                    Transform(scale=(1.0,0.85,0.9),translation=(0.0,2.6,0.0),
                      children=[
                      Comment('Upper piece of main body'),
                      Shape(
                        appearance=Appearance(
                          material=Material(diffuseColor=(1,0,0))),
                        geometry=IndexedFaceSet(coordIndex=[1,0,6,7,-1,2,1,7,8,-1,3,2,8,9,-1,4,3,9,10,-1,5,4,10,11,-1,0,5,11,6,-1,0,1,2,3,4,5,-1,11,10,9,8,7,6,-1],creaseAngle=3.0,
                          coord=Coordinate(point=[(-14.85,2.673,6.2055),(-7.425,2.673,14.22),(7.425,2.673,14.22),(14.85,2.673,6.2055),(7.425,2.673,-1.809),(-7.425,2.673,-1.809),(-14.4,0.0,7.0),(-7.2,0.0,16.0),(7.2,0.0,16.0),(14.4,0.0,7.0),(7.2,0.0,-2.609),(-7.2,0.0,-2.609)])))])])])]),
              Transform(DEF='base_collo',rotation=(1.0,-3.07161E-8,1.82376E-7,0.355698),translation=(0.0,47.445,3.49),
                children=[
                Comment('Head'),
                Shape(
                   # Head base

                  appearance=Appearance(
                    material=Material(diffuseColor=(0.9,0.9,0.9))),
                  geometry=IndexedFaceSet(coordIndex=[1,0,6,7,-1,2,1,7,8,-1,3,2,8,9,-1,4,3,9,10,-1,5,4,10,11,-1,0,5,11,6,-1,0,1,2,3,4,5,-1,11,10,9,8,7,6,-1],creaseAngle=1.0,
                    coord=Coordinate(point=[(-6.3,2.223,1.3455),(-3.15,2.223,4.5),(3.15,2.223,4.5),(6.3,2.223,1.3455),(3.15,2.223,-1.809),(-3.15,2.223,-1.809),(-8.1,0.0,2.6955),(-4.05,0.0,7.2),(4.05,0.0,7.2),(8.1,0.0,2.6955),(4.05,0.0,-1.809),(-4.05,0.0,-1.809)]))),
                Transform(rotation=(1.0,-3.07161E-8,1.82376E-7,-0.355698),
                  children=[
                  Transform(DEF='collo_x',rotation=(1.0,0.0,0.0,0.25),
                    children=[
                    Transform(DEF='collo_y',
                      children=[
                      Transform(DEF='collo_z',
                        children=[
                        Transform(DEF='collo',rotation=(-0.577,-0.577,-0.577,2.094),translation=(0.0,2.175,0.8079),
                          children=[
                          Comment('Head w/out the base'),
                          Shape(
                            appearance=Appearance(
                              material=Material(diffuseColor=(1.0,0.7,0.7))),
                            geometry=IndexedFaceSet(coordIndex=[0,1,7,6,-1,1,2,8,7,-1,2,3,9,8,-1,3,4,10,9,-1,4,5,11,10,-1,5,0,6,11,-1,6,7,12,-1,7,8,12,-1,8,9,12,-1,9,10,12,-1,10,11,12,-1,11,6,12,-1,5,4,3,2,1,0,-1],creaseAngle=1.0,
                              coord=Coordinate(point=[(4.45152,-2.17003,-1.65596),(4.45152,2.45372,-1.65596),(0.936255,3.75084,-0.348291),(-2.0021,2.45372,0.597931),(-2.0021,-2.17003,0.597931),(0.936255,-3.46716,-0.348291),(4.80862,-2.17003,5.47309),(4.80862,2.45372,5.47309),(1.05862,3.75084,5.47309),(-2.11447,2.45372,5.11166),(-2.11447,-2.17003,5.11166),(1.05862,-3.74916,5.47309),(-0.0247538,0.141844,7.46774)]))),
                          Transform(DEF='testa',translation=(0.0,0.0,2.0),
                            children=[
                            Comment('Head w/out the neck'),
                            Shape(
                              appearance=Appearance(
                                material=Material(diffuseColor=(1.0,0.8,0.8))),
                              geometry=IndexedFaceSet(coordIndex=[0,2,1,-1,0,3,2,-1,0,4,3,-1,0,5,4,-1,0,6,5,-1,0,1,6,-1,1,2,8,7,-1,2,3,9,8,-1,3,4,10,9,-1,4,5,11,10,-1,5,6,12,11,-1,6,1,7,12,-1,7,8,14,13,-1,8,9,15,14,-1,9,10,16,15,-1,10,11,17,16,-1,11,12,18,17,-1,12,7,13,18,-1,13,14,20,19,-1,14,21,20,-1,15,16,129,22,21,-1,16,17,128,129,-1,17,18,24,23,128,-1,18,13,24,-1,19,20,26,25,-1,20,21,35,27,26,-1,21,22,34,35,-1,22,23,33,34,-1,23,24,32,33,-1,24,19,25,30,32,-1,25,26,31,-1,26,27,31,-1,27,28,31,-1,28,29,31,-1,29,30,31,-1,30,25,31,-1,14,15,21,-1,13,19,24,-1,34,28,27,35,-1,33,29,28,34,-1,32,30,29,33,-1,36,37,38,39,-1,41,43,42,40,-1,43,45,44,42,-1,45,47,46,44,-1,47,49,48,46,-1,49,51,50,48,-1,51,53,52,50,-1,53,55,54,52,-1,55,57,56,54,-1,57,59,58,56,-1,59,61,60,58,-1,61,63,62,60,-1,63,65,64,62,-1,65,67,66,64,-1,67,69,68,66,-1,69,71,70,68,-1,71,73,72,70,-1,73,75,74,72,-1,75,77,76,74,-1,77,79,78,76,-1,79,41,40,78,-1,79,77,75,73,71,69,67,65,63,61,59,57,55,53,51,49,47,45,43,41,-1,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,-1,80,82,83,81,-1,82,84,85,83,-1,84,86,87,85,-1,86,88,89,87,-1,88,90,91,89,-1,90,92,93,91,-1,92,94,95,93,-1,94,96,97,95,-1,96,98,99,97,-1,98,100,101,99,-1,100,102,103,101,-1,102,104,105,103,-1,104,106,107,105,-1,106,108,109,107,-1,108,110,111,109,-1,110,112,113,111,-1,112,114,115,113,-1,114,116,117,115,-1,116,118,119,117,-1,118,80,81,119,-1,81,83,85,87,89,91,93,95,97,99,101,103,105,107,109,111,113,115,117,119,-1,118,116,114,112,110,108,106,104,102,100,98,96,94,92,90,88,86,84,82,80,-1,124,127,126,125,-1,120,123,127,124,-1,122,126,127,123,-1,120,124,125,121,-1,128,23,22,129,-1],creaseAngle=1.0,
                                coord=Coordinate(point=[(3.75199,0.00557172,0.0),(-2.11559,2.45726,0.774298),(-2.11559,-2.17316,0.774298),(1.05919,-3.75457,1.13555),(4.81119,-2.17316,1.13555),(4.81119,2.45726,1.13555),(1.05919,3.75626,1.13555),(-1.98176,3.01876,2.6199),(-1.96721,-3.02463,2.6199),(2.48017,-4.71312,3.04377),(7.47234,-2.12938,2.26562),(7.45797,2.31758,2.26334),(2.45746,4.72046,3.04377),(-4.44866,2.2044,4.05771),(-4.43802,-2.21759,4.05771),(2.483,-5.89232,4.05765),(8.91895,-2.19852,3.62664),(8.90844,2.22346,3.62498),(2.45462,5.89966,4.05765),(-9.3863,2.56556,11.1571),(-9.37388,-2.59342,11.1571),(2.48654,-7.36632,11.1569),(9.38619,-2.56556,11.1569),(9.37377,2.59343,11.1569),(2.45108,7.37366,11.1569),(-8.3976,2.19853,20.1157),(-8.38695,-2.22346,20.1157),(2.48459,-6.55562,20.1157),(8.3976,-2.19853,20.1157),(8.38695,2.22346,20.1157),(2.45303,6.56296,20.1157),(2.46882,0.00367026,21.3),(2.45219,6.86625,16.7639),(8.582,2.29667,18.3429),(8.60431,-2.2753,18.2417),(2.48524,-6.87152,16.6247),(9.03892,-1.68511,6.99805),(8.95401,-0.903916,6.06347),(8.93312,0.735113,6.03199),(9.01667,1.69806,6.93117),(0.219811,-8.31043,9.62343),(0.134378,-7.73162,9.60773),(0.856056,-8.18926,9.79412),(0.770614,-7.61045,9.77843),(1.41676,-8.07414,10.2347),(1.33132,-7.49533,10.219),(1.84703,-7.97632,10.9022),(1.7616,-7.39752,10.8865),(2.10478,-7.90539,11.7311),(2.01934,-7.32658,11.7154),(2.16474,-7.86829,12.6404),(2.0793,-7.28948,12.6248),(2.02107,-7.86865,13.5411),(1.93564,-7.28984,13.5254),(1.68783,-7.90643,14.3449),(1.60239,-7.32762,14.3292),(1.19762,-7.97794,14.9732),(1.11218,-7.39913,14.9575),(0.598444,-8.07617,15.3645),(0.513002,-7.49736,15.3488),(-0.0510553,-8.19151,15.4805),(-0.136498,-7.6127,15.4648),(-0.687301,-8.31267,15.3098),(-0.772734,-7.73386,15.2941),(-1.248,-8.4278,14.8692),(-1.33344,-7.84899,14.8535),(-1.67828,-8.52562,14.2018),(-1.76372,-7.94681,14.1861),(-1.93602,-8.59655,13.3728),(-2.02146,-8.01773,13.3571),(-1.99599,-8.63365,12.4635),(-2.08143,-8.05483,12.4478),(-1.85232,-8.63329,11.5629),(-1.93776,-8.05448,11.5472),(-1.51906,-8.59551,10.7591),(-1.60451,-8.0167,10.7434),(-1.02886,-8.524,10.1307),(-1.1143,-7.94519,10.1151),(-0.429679,-8.42577,9.73945),(-0.515121,-7.84696,9.72375),(0.23027,7.75592,9.29819),(0.144077,7.17707,9.30595),(0.866356,7.64094,9.47366),(0.780163,7.06208,9.48142),(1.42692,7.54303,9.9186),(1.34072,6.96418,9.92635),(1.85709,7.47179,10.5895),(1.77089,6.89292,10.5972),(2.11475,7.43417,11.4206),(2.02855,6.85532,11.4284),(2.17469,7.43388,12.3307),(2.08849,6.85501,12.3384),(2.03103,7.47092,13.2306),(1.94483,6.89206,13.2383),(1.69785,7.54168,14.0322),(1.61165,6.96282,14.0399),(1.20775,7.63924,14.6571),(1.12155,7.06038,14.6648),(0.608706,7.75404,15.0441),(0.522513,7.17518,15.0518),(-0.0406342,7.87484,15.1553),(-0.126836,7.29598,15.163),(-0.67672,7.98982,14.9798),(-0.762922,7.41096,14.9876),(-1.23728,8.08773,14.5349),(-1.32348,7.50887,14.5427),(-1.66745,8.15897,13.864),(-1.75365,7.58012,13.8718),(-1.92511,8.19659,13.0329),(-2.01131,7.61774,13.0406),(-1.98505,8.19689,12.1228),(-2.07124,7.61803,12.1306),(-1.8414,8.15984,11.2229),(-1.92759,7.58099,11.2307),(-1.50821,8.08908,10.4213),(-1.59441,7.51022,10.4291),(-1.01811,7.99153,9.7964),(-1.10431,7.41266,9.80416),(-0.41907,7.87672,9.40942),(-0.505272,7.29787,9.41718),(9.0899,-0.959294,7.83018),(9.0899,-0.350023,12.2864),(9.0899,0.0890149,12.2864),(9.0899,0.918413,7.83018),(10.3688,-0.378663,7.83299),(9.26496,-0.348896,12.2864),(9.26496,0.0901425,12.2864),(10.3785,0.223488,7.83018),(8.88037,2.40845,7.35785),(8.89189,-2.38204,7.35785)])))])])])])])])]),
              Transform(DEF='clavicola_sinistra',rotation=(0.707,2.10734E-8,0.707,3.14159),translation=(3.68,44.23,4.295),
                children=[
                Comment('Left hand + shoulder'),
                Shape(
                   # Left Shoulder

                  appearance=Appearance(
                    material=Material(diffuseColor=(1,0,0))),
                  geometry=IndexedFaceSet(coordIndex=[1,2,0,-1,2,20,0,-1,0,3,19,-1,4,5,0,-1,14,6,15,-1,15,6,16,-1,7,8,2,1,-1,17,9,3,20,-1,3,9,18,19,-1,10,11,5,4,-1,11,12,6,14,5,-1,12,7,1,16,6,-1,13,8,7,-1,13,9,17,-1,13,10,18,-1,13,11,10,-1,13,12,11,-1,13,7,12,-1,15,0,5,-1,15,16,1,-1,1,0,15,-1,20,2,8,17,-1,15,5,14,-1,20,3,0,-1,0,19,4,-1,19,18,10,4,-1,13,18,9,-1,13,17,8,-1],creaseAngle=1.0,
                    coord=Coordinate(point=[(0.0,1.48143,20.4295),(-3.76,6.31898,11.3924),(-5.02,1.42392,18.2963),(0.0,-2.23765,14.2125),(5.02,1.42392,18.2963),(3.76,6.26603,11.3768),(-0.0073367,13.0624,2.55425),(-3.76,6.26604,2.47568),(-3.76,0.693588,2.47568),(0.0,-4.45516,2.47568),(3.76,0.594813,2.47568),(3.76,6.26604,2.47568),(-0.00678022,13.4975,-3.79546),(0.0,0.0,0.0),(1.87693,10.1351,7.78251),(-8.7608E-4,8.83749,10.5483),(-1.88308,10.1224,7.87083),(-1.91737,-3.80795,2.47568),(1.77166,-3.86248,2.47568),(3.49215,-1.35336,16.4408),(-2.65838,-0.995574,15.6679)]))),
                Transform(DEF='brsup_sin',rotation=(0.707,2.10734E-8,0.707,-3.14159),
                  children=[
                  Comment('Left hand'),
                  Transform(DEF='spalla_sin',rotation=(1.0,0.0,0.0,-3),translation=(16.14,1.03,0.0),
                    children=[
                    Comment('rotation of left hand'),
                    Transform(DEF='spalla_sinistra',rotation=(0.577,-0.577,0.577,2.094),
                      children=[
                      Shape(DEF='avambraccio',
                         # Left up hand

                        appearance=Appearance(
                          material=Material(diffuseColor=(1,0,0))),
                        geometry=IndexedFaceSet(coordIndex=[0,15,14,-1,0,16,15,-1,0,17,16,-1,0,18,17,-1,0,19,18,-1,0,14,19,-1,14,15,2,1,-1,15,16,3,2,-1,16,17,4,3,-1,17,18,5,4,-1,18,19,6,5,-1,19,14,1,6,-1,1,2,8,7,-1,2,3,9,8,-1,3,4,10,9,-1,4,5,11,10,-1,5,6,12,11,-1,6,1,7,12,-1,7,8,13,-1,8,9,13,-1,9,10,13,-1,10,11,13,-1,11,12,13,-1,12,7,13,-1],creaseAngle=1.0,
                          coord=Coordinate(point=[(-0.0472,0.03465,34.8689),(2.8112,2.24,31.34),(2.8112,-2.24,31.34),(-0.0472,-4.3309,31.34),(-2.8112,-2.24,31.34),(-2.8112,2.24,31.34),(-0.0472,4.3309,31.34),(4.0,2.81576,2.45392),(5.02,-2.15631,2.45392),(0.0,-4.28954,2.51143),(-5.02,-2.15631,2.45392),(-4.0,2.84589,2.45392),(-0.132948,5.30748,2.45392),(-0.0472,0.03465,0.0),(2.43,1.9362,33.1044),(2.43,-1.9362,33.1044),(-0.0472,-3.7506,33.1044),(-2.43,-1.9362,33.1044),(-2.43,1.9362,33.1044),(-0.0472,3.7506,33.1044)]))),
                      Transform(rotation=(0.577,-0.577,0.577,-2.0944),
                        children=[
                        Transform(DEF='braccio_sin',rotation=(1.0,0.0,0.0,0),translation=(0.0,-31.34,0.0),
                          children=[
                          Comment('L lower hand + palm.'),
                          Comment('L Ellbow rotation'),
                          Transform(DEF='braccio_sinistro',rotation=(0.577,-0.577,0.577,2.0944),
                            children=[
                            Shape(
                               # Lower left hand

                              appearance=Appearance(
                                material=Material(diffuseColor=(1,0,0))),
                              geometry=IndexedFaceSet(coordIndex=[0,21,20,-1,0,22,21,-1,0,23,22,-1,0,24,23,-1,0,25,24,-1,0,20,25,-1,1,2,8,7,-1,2,3,9,8,-1,3,4,10,9,-1,4,5,11,10,-1,5,6,12,11,-1,6,1,7,12,-1,14,15,13,-1,15,16,13,-1,16,17,13,-1,17,18,13,-1,18,19,13,-1,19,14,13,-1,7,8,15,14,-1,8,9,16,15,-1,9,10,17,16,-1,10,11,18,17,-1,11,12,19,18,-1,12,7,14,19,-1,21,2,1,20,-1,22,3,2,21,-1,23,4,3,22,-1,24,5,4,23,-1,25,6,5,24,-1,20,1,6,25,-1],creaseAngle=1.0,
                                coord=Coordinate(point=[(-0.0671,0.0,28.8269),(1.40855,0.9656,27.02),(1.40855,-0.9656,27.02),(-0.0671,-1.9312,27.02),(-1.40855,-0.9656,27.02),(-1.40855,0.9656,27.02),(-0.0671,1.9312,27.02),(2.75,2.0688,0.0),(2.75,-2.0688,0.0),(-0.0671,-4.0,0.0),(-2.75,-2.0688,0.0),(-2.75,2.0688,0.0),(-0.0671,4.0,0.0),(-0.0671,0.0,-3.52881),(2.57455,1.9368,-1.76441),(2.57455,-1.9368,-1.76441),(-0.0671,-3.464,-1.76441),(-2.57455,-1.9368,-1.76441),(-2.57455,1.9368,-1.76441),(-0.0671,3.464,-1.76441),(1.21984,0.836236,27.9234),(1.21984,-0.836236,27.9234),(0.0,-1.67247,27.9234),(-1.21984,-0.836236,27.9234),(-1.21984,0.836236,27.9234),(0.0,1.67247,27.9234)]))),
                            Transform(rotation=(0.57735,-0.57735,0.57735,-2.0944),scale=(0.6,0.6,0.6),
                              children=[
                              Transform(DEF='mano_sinistra',rotation=(0.0,1.0,0.0,1.57),scale=(0.6,1.1,1.0),translation=(0.0,-45.0,0.0),
                                children=[
                                Comment('L palm + fing'),
                                Comment('L palm rotation'),
                                Shape(DEF='palmo',
                                  appearance=Appearance(
                                    material=Material(diffuseColor=(1.0,0.7,0.7))),
                                  geometry=IndexedFaceSet(coordIndex=[0,3,2,1,-1,4,5,0,1,-1,7,6,5,4,-1,0,5,6,11,8,3,-1,8,9,2,3,-1,11,10,9,8,-1,10,7,4,1,2,9,-1,6,7,10,11,-1],creaseAngle=3.0,
                                    coord=Coordinate(point=[(-4.5,0.0,2.5),(-4.5,0.0,-2.5),(4.5,0.0,-2.5),(4.5,0.0,2.5),(-10.0,-8.0,-1.5),(-10.0,-8.0,1.5),(-10.0,-14.0,1.5),(-10.0,-14.0,-1.5),(8.0,-8.0,1.5),(8.0,-8.0,-1.5),(8.0,-14.0,-1.5),(8.0,-14.0,1.5)]))),
                                Transform(DEF='indice_sinistro',scale=(1.6,0.8,1.0),translation=(-8.0,-14.0,0.0),
                                  children=[
                                  Transform(DEF='ind_s_inf',rotation=(1.0,0.0,0.0,0.3),
                                    children=[
                                    Shape(DEF='ditoinf',
                                      appearance=Appearance(
                                        material=Material(diffuseColor=(1.0,0.7,0.7))),
                                      geometry=IndexedFaceSet(coordIndex=[0,1,2,3,4,5,6,7,-1,15,14,13,12,11,10,9,8,-1,15,7,6,14,-1,15,8,0,7,-1,8,9,1,0,-1,9,10,2,1,-1,10,11,3,2,-1,11,12,4,3,-1,12,13,5,4,-1,13,14,6,5,-1],creaseAngle=3.0,
                                        coord=Coordinate(point=[(-0.8,0.0,1.5),(0.8,0.0,1.5),(1.3,0.0,0.8),(1.3,0.0,-0.8),(0.8,0.0,-1.5),(-0.8,0.0,-1.5),(-1.3,0.0,-0.8),(-1.3,0.0,0.8),(-0.8,-6.0,1.5),(0.8,-6.0,1.5),(1.3,-6.0,0.8),(1.3,-6.0,-0.8),(0.8,-6.0,-1.5),(-0.8,-6.0,-1.5),(-1.3,-6.0,-0.8),(-1.3,-6.0,0.8)]))),
                                    Transform(translation=(0.0,-6.0,0.0),
                                      children=[
                                      Transform(DEF='ind_s_sup',rotation=(1.0,0.0,0.0,0.4),
                                        children=[
                                        Shape(DEF='ditosup',
                                          appearance=Appearance(
                                            material=Material(diffuseColor=(1.0,0.7,0.7))),
                                          geometry=IndexedFaceSet(coordIndex=[0,1,2,3,4,5,6,7,-1,15,14,13,12,11,10,9,8,-1,15,7,6,14,-1,15,8,0,7,-1,8,9,1,0,-1,9,10,2,1,-1,10,11,3,2,-1,11,12,4,3,-1,12,13,5,4,-1,13,14,6,5,-1],creaseAngle=3.0,
                                            coord=Coordinate(point=[(-0.8,0.0,1.5),(0.8,0.0,1.5),(1.3,0.0,0.8),(1.3,0.0,-0.8),(0.8,0.0,-1.5),(-0.8,0.0,-1.5),(-1.3,0.0,-0.8),(-1.3,0.0,0.8),(-0.6,-6.0,1.0),(0.6,-6.0,1.0),(0.8,-6.0,0.6),(0.8,-6.0,-0.6),(0.6,-6.0,-1.0),(-0.6,-6.0,-1.0),(-0.8,-6.0,-0.6),(-0.8,-6.0,0.6)])))])])])]),
                                Transform(DEF='medio_sinistro',scale=(1.8,0.9,1.0),translation=(-3.0,-14.0,0.0),
                                  children=[
                                  Transform(DEF='med_s_inf',rotation=(1.0,0.0,0.0,0.3),
                                    children=[
                                    Shape(USE='ditoinf'),
                                    Transform(translation=(0.0,-6.0,0.0),
                                      children=[
                                      Transform(DEF='med_s_sup',rotation=(1.0,0.0,0.0,0.4),
                                        children=[
                                        Shape(USE='ditosup')])])])]),
                                Transform(DEF='anulare_sinistro',scale=(1.5,0.8,0.95),translation=(1.6,-14.0,0.0),
                                  children=[
                                  Transform(DEF='an_s_inf',rotation=(1.0,0.0,0.0,0.3),
                                    children=[
                                    Shape(USE='ditoinf'),
                                    Transform(translation=(0.0,-6.0,0.0),
                                      children=[
                                      Transform(DEF='an_s_sup',rotation=(1.0,0.0,0.0,0.4),
                                        children=[
                                        Shape(USE='ditosup')])])])]),
                                Transform(DEF='mignolo_sinistro',scale=(1.35,0.7,1.0),translation=(6.0,-14.0,0.0),
                                  children=[
                                  Transform(DEF='min_s_inf',rotation=(1.0,0.0,0.0,0.3),
                                    children=[
                                    Shape(USE='ditoinf'),
                                    Transform(translation=(0.0,-6.0,0.0),
                                      children=[
                                      Transform(DEF='min_s_sup',rotation=(1.0,0.0,0.0,0.4),
                                        children=[
                                        Shape(USE='ditosup')])])])]),
                                Transform(DEF='pollice_sinistro',rotation=(0.0,0.0,1.0,-0.8),scale=(1.3,0.7,1.3),translation=(-9.5,-11.0,0.0),
                                  children=[
                                  Transform(rotation=(1.0,0.0,0.0,0.2),
                                    children=[
                                    Transform(DEF='pol_s_inf',
                                      children=[
                                      Shape(USE='ditoinf'),
                                      Transform(scale=(1.0,0.9,1.0),translation=(0.0,-6.0,0.0),
                                        children=[
                                        Transform(DEF='pol_s_sup',
                                          children=[
                                          Shape(USE='ditosup')])])])])])])])])])])])])])]),
              Transform(DEF='clavicola_destra',rotation=(-2.185573E-8,-1.0,7.9466E-9,1.57079),translation=(-3.68,44.23,4.295),
                children=[
                Comment('R hand + shoulder'),
                Shape(
                   # R shoulder

                  appearance=Appearance(
                    material=Material(diffuseColor=(1,0,0))),
                  geometry=IndexedFaceSet(coordIndex=[0,2,1,-1,0,20,2,-1,19,3,0,-1,0,5,4,-1,15,6,14,-1,16,6,15,-1,1,2,8,7,-1,20,3,9,17,-1,19,18,9,3,-1,4,5,11,10,-1,5,14,6,12,11,-1,6,16,1,7,12,-1,7,8,13,-1,17,9,13,-1,18,10,13,-1,10,11,13,-1,11,12,13,-1,12,7,13,-1,5,0,15,-1,1,16,15,-1,15,0,1,-1,17,8,2,20,-1,14,5,15,-1,0,3,20,-1,4,19,0,-1,4,10,18,19,-1,9,18,13,-1,8,17,13,-1],creaseAngle=1.0,
                    coord=Coordinate(point=[(0.0,-1.48143,20.4295),(-3.76,-6.31898,11.3924),(-5.02,-1.42392,18.2963),(0.0,2.23765,14.2125),(5.02,-1.42392,18.2963),(3.76,-6.26603,11.3768),(-0.0073367,-13.0624,2.55425),(-3.76,-6.26604,2.47568),(-3.76,-0.693588,2.47568),(0.0,4.45516,2.47568),(3.76,-0.594813,2.47568),(3.76,-6.26604,2.47568),(-0.00678022,-13.4975,-3.79546),(0.0,0.0,0.0),(1.87693,-10.1351,7.78251),(-8.7608E-4,-8.83749,10.5483),(-1.88308,-10.1224,7.87083),(-1.91737,3.80795,2.47568),(1.77166,3.86248,2.47568),(3.49215,1.35336,16.4408),(-2.65838,0.995574,15.6679)]))),
                Transform(rotation=(-2.185573E-8,-1.0,7.9466E-9,-1.57079),
                  children=[
                  Comment('R hand'),
                  Transform(DEF='spalla_des',rotation=(1,0,0,-3),translation=(-16.14,1.03,0.0),
                    children=[
                    Comment('rotation of R hand'),
                    Transform(DEF='brsup_des',rotation=(0.577,-0.577,0.577,2.0944),
                      children=[
                      Shape(
                         # R up hand

                        appearance=Appearance(
                          material=Material(diffuseColor=(1,0,0))),
                        geometry=IndexedFaceSet(coordIndex=[0,15,14,-1,0,16,15,-1,0,17,16,-1,0,18,17,-1,0,19,18,-1,0,14,19,-1,14,15,2,1,-1,15,16,3,2,-1,16,17,4,3,-1,17,18,5,4,-1,18,19,6,5,-1,19,14,1,6,-1,1,2,8,7,-1,2,3,9,8,-1,3,4,10,9,-1,4,5,11,10,-1,5,6,12,11,-1,6,1,7,12,-1,7,8,13,-1,8,9,13,-1,9,10,13,-1,10,11,13,-1,11,12,13,-1,12,7,13,-1],creaseAngle=1.0,
                          coord=Coordinate(point=[(-0.0472,0.03465,34.8689),(2.8112,2.24,31.34),(2.8112,-2.24,31.34),(-0.0472,-4.3309,31.34),(-2.8112,-2.24,31.34),(-2.8112,2.24,31.34),(-0.0472,4.3309,31.34),(5.02,2.15631,2.45392),(4.0,-2.90427,2.45392),(-0.0472,-6.45702,2.45392),(-4.0,-2.90263,2.45392),(-5.02,2.15631,2.45392),(0.0,4.28954,2.51143),(-0.0472,0.03465,0.0),(2.43,1.9362,33.1044),(2.43,-1.9362,33.1044),(-0.0472,-3.7506,33.1044),(-2.43,-1.9362,33.1044),(-2.43,1.9362,33.1044),(-0.0472,3.7506,33.1044)]))),
                      Transform(rotation=(0.577,-0.577,0.577,-2.0944),
                        children=[
                        Transform(DEF='braccio_des',rotation=(1.0,0.0,0.0,0),translation=(0.0,-31.34,0.0),
                          children=[
                          Comment('R lower hand + palm'),
                          Comment('lower hand rotation'),
                          Transform(DEF='brinf_des',rotation=(0.577,-0.577,0.577,2.0944),
                            children=[
                            Shape(
                               # R lower hand

                              appearance=Appearance(
                                material=Material(diffuseColor=(1,0,0))),
                              geometry=IndexedFaceSet(coordIndex=[0,21,20,-1,0,22,21,-1,0,23,22,-1,0,24,23,-1,0,25,24,-1,0,20,25,-1,1,2,8,7,-1,2,3,9,8,-1,3,4,10,9,-1,4,5,11,10,-1,5,6,12,11,-1,6,1,7,12,-1,14,15,13,-1,15,16,13,-1,16,17,13,-1,17,18,13,-1,18,19,13,-1,19,14,13,-1,7,8,15,14,-1,8,9,16,15,-1,9,10,17,16,-1,10,11,18,17,-1,11,12,19,18,-1,12,7,14,19,-1,21,2,1,20,-1,22,3,2,21,-1,23,4,3,22,-1,24,5,4,23,-1,25,6,5,24,-1,20,1,6,25,-1],creaseAngle=1.0,
                                coord=Coordinate(point=[(-0.0671,0.0,28.8269),(1.40855,0.9656,27.02),(1.40855,-0.9656,27.02),(-0.0671,-1.9312,27.02),(-1.40855,-0.9656,27.02),(-1.40855,0.9656,27.02),(-0.0671,1.9312,27.02),(2.75,2.0688,0.0),(2.75,-2.0688,0.0),(-0.0671,-4.0,0.0),(-2.75,-2.0688,0.0),(-2.75,2.0688,0.0),(-0.0671,4.0,0.0),(-0.0671,0.0,-3.52881),(2.57455,1.9368,-1.76441),(2.57455,-1.9368,-1.76441),(-0.0671,-3.464,-1.76441),(-2.57455,-1.9368,-1.76441),(-2.57455,1.9368,-1.76441),(-0.0671,3.464,-1.76441),(1.21984,0.836236,27.9234),(1.21984,-0.836236,27.9234),(0.0,-1.67247,27.9234),(-1.21984,-0.836236,27.9234),(-1.21984,0.836236,27.9234),(0.0,1.67247,27.9234)]))),
                            Transform(rotation=(0.57735,-0.57735,0.57735,-2.0944),scale=(0.6,0.6,0.6),
                              children=[
                              Transform(DEF='mano_destra',rotation=(0.0,1.0,0.0,1.57),scale=(0.6,1.1,1.0),translation=(0.0,-45.0,0.0),
                                children=[
                                Comment('R palm'),
                                Comment('rotation of R palm'),
                                Shape(USE='palmo'),
                                Transform(DEF='indice_destro',scale=(1.6,0.8,1.0),translation=(-8.0,-14.0,0.0),
                                  children=[
                                  Transform(DEF='ind_d_inf',rotation=(1.0,0.0,0.0,-0.3),
                                    children=[
                                    Shape(USE='ditoinf'),
                                    Transform(translation=(0.0,-6.0,0.0),
                                      children=[
                                      Transform(DEF='ind_d_sup',rotation=(1.0,0.0,0.0,-0.4),
                                        children=[
                                        Shape(USE='ditosup')])])])]),
                                Transform(DEF='medio_destro',scale=(1.8,0.9,1.0),translation=(-3.0,-14.0,0.0),
                                  children=[
                                  Transform(DEF='med_d_inf',rotation=(1.0,0.0,0.0,-0.3),
                                    children=[
                                    Shape(USE='ditoinf'),
                                    Transform(translation=(0.0,-6.0,0.0),
                                      children=[
                                      Transform(DEF='med_d_sup',rotation=(1.0,0.0,0.0,-0.4),
                                        children=[
                                        Shape(USE='ditosup')])])])]),
                                Transform(DEF='anulare_destro',scale=(1.5,0.8,0.95),translation=(1.6,-14.0,0.0),
                                  children=[
                                  Transform(DEF='an_d_inf',rotation=(1.0,0.0,0.0,-0.3),
                                    children=[
                                    Shape(USE='ditoinf'),
                                    Transform(translation=(0.0,-6.0,0.0),
                                      children=[
                                      Transform(DEF='an_d_sup',rotation=(1.0,0.0,0.0,-0.4),
                                        children=[
                                        Shape(USE='ditosup')])])])]),
                                Transform(DEF='mignolo_destro',scale=(1.35,0.7,1.0),translation=(6.0,-14.0,0.0),
                                  children=[
                                  Transform(DEF='min_d_inf',rotation=(1.0,0.0,0.0,-0.3),
                                    children=[
                                    Shape(USE='ditoinf'),
                                    Transform(translation=(0.0,-6.0,0.0),
                                      children=[
                                      Transform(DEF='min_d_sup',rotation=(1.0,0.0,0.0,-0.4),
                                        children=[
                                        Shape(USE='ditosup')])])])]),
                                Transform(DEF='pollice_destro',rotation=(0.0,0.0,1.0,-0.8),scale=(1.3,0.7,1.3),translation=(-9.5,-11.0,0.0),
                                  children=[
                                  Transform(rotation=(1.0,0.0,0.0,-0.2),
                                    children=[
                                    Transform(DEF='pol_d_inf',rotation=(1.0,0.0,0.0,0.0),
                                      children=[
                                      Shape(USE='ditoinf'),
                                      Transform(scale=(1.0,0.9,1.0),translation=(0.0,-6.0,0.0),
                                        children=[
                                        Transform(DEF='pol_d_sup',rotation=(1.0,0.0,0.0,0.0),
                                          children=[
                                          Shape(USE='ditosup')])])])])])])])])])])])])])])])])])]),
      Transform(DEF='parte_inferiore',translation=(-8.4,101.0,-23.765),
        children=[
        Comment('Lower part'),
        Transform(DEF='torso',rotation=(-0.577,-0.577,-0.577,2.0944),translation=(0.06,-12.71,7.525),
          children=[
          Shape(
             # waste

            appearance=Appearance(
              material=Material(diffuseColor=(0.9,0.9,0.9))),
            geometry=IndexedFaceSet(coordIndex=[8,12,17,16,-1,4,12,8,-1,0,4,8,-1,7,0,8,-1,8,16,7,-1,10,19,18,12,-1,10,12,4,-1,10,4,1,-1,10,1,11,-1,10,11,19,-1,17,15,13,-1,4,0,1,-1,7,16,13,5,-1,16,17,13,-1,19,11,6,14,-1,11,1,3,6,-1,1,0,2,3,-1,0,7,5,2,-1,2,5,9,-1,5,13,9,-1,13,14,9,-1,14,6,9,-1,6,3,9,-1,3,2,9,-1,18,19,14,-1,15,18,14,-1,15,14,13,-1,15,12,18,-1,17,12,15,-1],creaseAngle=1.0,
              coord=Coordinate(point=[(-10.1695,-11.252,0.0),(-10.1695,11.252,0.0),(-7.25989,-6.075,13.5186),(-7.25989,6.075,13.5186),(-4.54952,0.0,-1.76908),(-1.12652,-12.15,12.0597),(-1.12652,12.15,12.0597),(0.0,-14.3316,0.0),(0.0,-8.30424,-2.0),(0.0,0.0,16.1),(0.0,8.30424,-2.0),(0.0,14.947,0.0),(0.777966,0.0,-0.517646),(6.76335,-7.423,10.6008),(6.46148,7.87094,10.6008),(5.49435,-0.575459,3.07913),(6.34917,-11.1683,0.0),(6.43068,-4.06308,0.0),(6.41322,4.0032,0.0),(6.48024,11.252,0.0)]))),
          Transform(rotation=(-0.577,-0.577,-0.577,-2.0944),
            children=[
            Comment('Both legs'),
            Transform(DEF='coscia_des',rotation=(1,0,0,0),translation=(-8.4,0.0,0.0),
              children=[
              Comment('R leg'),
              Comment('R leg rotation'),
              Transform(DEF='coscia_destra',rotation=(0.57735,-0.57735,0.57735,2.09439),
                children=[
                Shape(
                   # R up leg

                  appearance=Appearance(
                    material=Material(diffuseColor=(0.9,0.9,0.9))),
                  geometry=IndexedFaceSet(coordIndex=[0,15,14,-1,0,16,15,-1,0,17,16,-1,0,18,17,-1,0,19,18,-1,0,14,19,-1,14,15,2,1,-1,15,16,3,2,-1,16,17,4,3,-1,17,18,5,4,-1,18,19,6,5,-1,19,14,1,6,-1,1,2,8,7,-1,2,3,9,8,-1,3,4,10,9,-1,4,5,11,10,-1,5,6,12,11,-1,6,1,7,12,-1,20,21,13,-1,21,22,13,-1,22,23,13,-1,23,24,13,-1,24,25,13,-1,25,20,13,-1,21,20,7,8,-1,22,21,8,9,-1,23,22,9,10,-1,24,23,10,11,-1,25,24,11,12,-1,20,25,12,7,-1],creaseAngle=3.0,
                    coord=Coordinate(point=[(0.0,0.0,45.5983),(4.87835,2.43917,40.72),(4.87835,-2.43917,40.72),(0.0,-4.87835,40.72),(-4.87835,-2.43917,40.72),(-4.87835,2.43917,40.72),(0.0,4.87835,40.72),(6.34917,2.76829,0.0),(6.43068,-4.33692,0.0),(0.0,-8.06858,0.0),(-10.1695,-2.852,0.0),(-10.1695,2.852,0.0),(0.0,5.93159,0.0),(0.0,0.0,-10.8845),(4.22452,2.11262,43.1591),(4.22452,-2.11262,43.1591),(0.0,-4.22452,43.1591),(-4.22452,-2.11262,43.1591),(-4.22452,2.11262,43.1591),(0.0,4.22452,43.1591),(5.28309,0.295353,-5.44019),(6.19037,-2.0145,-5.44019),(0.0,-4.73717,-5.44019),(-8.71143,-2.37429,-5.44019),(-8.5567,0.713856,-5.44019),(-0.117189,4.52141,-5.44019)]))),
                Transform(rotation=(0.57735,-0.57735,0.57735,-2.09439),
                  children=[
                  Transform(DEF='polp_des',rotation=(1,0,0,0),translation=(0.0,-40.72,0.0),
                    children=[
                    Comment('R lower leg + foot'),
                    Comment('R knee rotation'),
                    Transform(DEF='polpaccio_destro',rotation=(0.57735,-0.57735,0.57735,2.09439),
                      children=[
                      Shape(
                         # R lower leg

                        appearance=Appearance(
                          material=Material(diffuseColor=(1,0,0))),
                        geometry=IndexedFaceSet(coordIndex=[0,2,1,-1,0,3,2,-1,0,4,3,-1,0,5,4,-1,0,6,5,-1,0,1,6,-1,1,2,8,7,-1,2,3,9,8,-1,3,4,10,9,-1,4,5,11,10,-1,5,6,12,11,-1,6,1,7,12,-1,14,15,13,-1,15,16,13,-1,16,17,13,-1,17,18,13,-1,18,19,13,-1,19,14,13,-1,15,14,7,8,-1,14,19,12,7,-1,19,18,11,12,-1,18,17,10,11,-1,17,16,9,10,-1,16,15,8,9,-1],creaseAngle=3.0,
                          coord=Coordinate(point=[(0.0,0.0,37.983),(4.815,2.16675,37.983),(4.815,-2.16675,37.983),(0.0,-3.745,37.983),(-3.745,-2.16675,37.983),(-3.745,2.16675,37.983),(0.0,3.745,37.983),(4.88081,2.44014,0.0),(4.88081,-2.44014,0.0),(0.0,-4.88081,0.0),(-4.88081,-2.44014,0.0),(-4.88081,2.44014,0.0),(0.0,4.88081,0.0),(0.0,0.0,-4.87909),(4.22704,2.11325,-2.44127),(4.22704,-2.11325,-2.44127),(0.0,-4.22704,-2.44127),(-4.22704,-2.11325,-2.44127),(-4.22704,2.11325,-2.44127),(0.0,4.22704,-2.44127)]))),
                      Transform(rotation=(0.57735,-0.57735,0.57735,-2.09439),
                        children=[
                        Transform(DEF='cav_des',translation=(0.0,-34.53,0.0),
                          children=[
                          Comment('R foot'),
                          Comment('R foot rotation'),
                          Transform(DEF='caviglia_destra',rotation=(0.57735,-0.57735,0.57735,2.09439),
                            children=[
                            Shape(
                              appearance=Appearance(
                                material=Material(diffuseColor=(0.1,0.1,0.4))),
                              geometry=IndexedFaceSet(coordIndex=[1,0,2,-1,2,0,3,-1,3,0,4,-1,4,0,5,-1,5,0,1,-1,1,2,7,6,-1,2,3,8,7,-1,3,4,9,8,-1,5,10,9,-1,9,4,5,-1,5,1,6,-1,6,10,5,-1],creaseAngle=3.0,
                                coord=Coordinate(point=[(-2.82282,0.0,8.07176),(0.0,2.66471,4.65658),(-3.44673,3.213,13.04),(-3.44673,-2.8833,13.04),(0.0,-2.66471,4.65658),(0.0,0.0,0.0),(11.7663,3.73,7.76141),(11.7663,3.28613,13.04),(11.7663,-3.28613,13.04),(11.7663,-3.73,7.76141),(11.7663,0.0,6.20965)]))),
                            Transform(rotation=(0.57735,-0.57735,0.57735,-2.09439),
                              children=[
                              Transform(DEF='piede_des',rotation=(1.0,0.0,0.0,0.0),translation=(0.0,-13.04,11.74),
                                children=[
                                Transform(DEF='piede2_destro',rotation=(0.57735,-0.57735,0.57735,2.09439),
                                  children=[
                                  Shape(
                                    appearance=Appearance(
                                      material=Material(diffuseColor=(0.1,0.1,0.4))),
                                    geometry=IndexedFaceSet(coordIndex=[7,8,14,13,-1,10,6,12,16,-1,13,12,6,7,-1,12,13,14,15,16,-1,15,14,8,9,-1,16,15,9,10,-1],creaseAngle=3.0,
                                      coord=Coordinate(point=[(0.0,0.0,0.0),(0.0,0.0,-1.13164),(0.0,0.0,0.0),(-0.074362,-0.274157,-0.958806),(-1.2218,-0.333,-0.1336),(0.0,-0.6644,-0.1336),(0.0273,3.73,-5.26816),(0.0273,3.28613,0.010432),(0.0273,-3.28613,0.010432),(0.0273,-3.73,-5.26816),(0.0273,0.0,-6.81992),(-0.333,-0.1336,-1.4263),(7.20118,2.76803,-3.61711),(7.20118,2.47356,0.010432),(7.20118,-2.50096,0.010432),(7.20118,-2.75649,-3.52969),(7.20118,0.0,-4.73182)])))])])])])])])])])])])]),
            Transform(DEF='coscia_sin',rotation=(1,0,0,0),translation=(8.4,0.0,0.0),
              children=[
              Comment('Left leg'),
              Comment('L leg rotation'),
              Transform(DEF='coscia_sinistra',rotation=(0.57735,-0.57735,0.57735,2.09439),
                children=[
                Comment('L leg+knee+foot'),
                Shape(
                   # L upper leg

                  appearance=Appearance(
                    material=Material(diffuseColor=(0.9,0.9,0.9))),
                  geometry=IndexedFaceSet(coordIndex=[0,15,14,-1,0,16,15,-1,0,17,16,-1,0,18,17,-1,0,19,18,-1,0,14,19,-1,14,15,2,1,-1,15,16,3,2,-1,16,17,4,3,-1,17,18,5,4,-1,18,19,6,5,-1,19,14,1,6,-1,1,2,8,7,-1,2,3,9,8,-1,3,4,10,9,-1,4,5,11,10,-1,5,6,12,11,-1,6,1,7,12,-1,20,21,13,-1,21,22,13,-1,22,23,13,-1,23,24,13,-1,24,25,13,-1,25,20,13,-1,21,20,7,8,-1,22,21,8,9,-1,23,22,9,10,-1,24,23,10,11,-1,25,24,11,12,-1,20,25,12,7,-1],creaseAngle=3.0,
                    coord=Coordinate(point=[(0.0,0.0,45.5983),(4.87835,2.43917,40.72),(4.87835,-2.43917,40.72),(0.0,-4.87835,40.72),(-4.87835,-2.43917,40.72),(-4.87835,2.43917,40.72),(0.0,4.87835,40.72),(6.41322,4.39679,0.0),(6.48024,-2.852,0.0),(0.0,-6.54699,0.0),(-10.1695,-2.852,0.0),(-10.1695,2.852,0.0),(0.0,8.35993,0.0),(0.0,0.0,-10.8845),(4.22452,2.11262,43.1591),(4.22452,-2.11262,43.1591),(0.0,-4.22452,43.1591),(-4.22452,-2.11262,43.1591),(-4.22452,2.11262,43.1591),(0.0,4.22452,43.1591),(5.57893,2.37318,-5.44019),(4.88202,-0.501396,-5.36555),(0.0,-4.89339,-5.44019),(-8.37244,-0.788649,-5.44019),(-8.71143,2.37429,-5.44019),(0.0,4.73717,-5.44019)]))),
                Transform(rotation=(0.57735,-0.57735,0.57735,-2.09439),
                  children=[
                  Transform(DEF='polp_sin',translation=(0.0,-40.72,0.0),
                    children=[
                    Comment('L foot'),
                    Comment('L foot rotation'),
                    Transform(DEF='polpaccio_sinistro',rotation=(0.57735,-0.57735,0.57735,2.09439),
                      children=[
                      Shape(
                         # L lower leg

                        appearance=Appearance(
                          material=Material(diffuseColor=(1,0,0))),
                        geometry=IndexedFaceSet(coordIndex=[0,2,1,-1,0,3,2,-1,0,4,3,-1,0,5,4,-1,0,6,5,-1,0,1,6,-1,1,2,8,7,-1,2,3,9,8,-1,3,4,10,9,-1,4,5,11,10,-1,5,6,12,11,-1,6,1,7,12,-1,14,15,13,-1,15,16,13,-1,16,17,13,-1,17,18,13,-1,18,19,13,-1,19,14,13,-1,15,14,7,8,-1,14,19,12,7,-1,19,18,11,12,-1,18,17,10,11,-1,17,16,9,10,-1,16,15,8,9,-1],creaseAngle=3.0,
                          coord=Coordinate(point=[(0.0,0.0,37.983),(4.815,2.16675,37.983),(4.815,-2.16675,37.983),(0.0,-3.745,37.983),(-3.745,-2.16675,37.983),(-3.745,2.16675,37.983),(0.0,3.745,37.983),(4.88081,2.44014,0.0),(4.88081,-2.44014,0.0),(0.0,-4.88081,0.0),(-4.88081,-2.44014,0.0),(-4.88081,2.44014,0.0),(0.0,4.88081,0.0),(0.0,0.0,-4.87909),(4.22704,2.11325,-2.44127),(4.22704,-2.11325,-2.44127),(0.0,-4.22704,-2.44127),(-4.22704,-2.11325,-2.44127),(-4.22704,2.11325,-2.44127),(0.0,4.22704,-2.44127)]))),
                      Transform(rotation=(0.57735,-0.57735,0.57735,-2.09439),
                        children=[
                        Transform(DEF='cav_sin',rotation=(1.0,0.0,0.0,0.0),translation=(0.0,-34.53,0.0),
                          children=[
                          Transform(DEF='piede1_sinistro',rotation=(0.57735,-0.57735,0.57735,2.09439),
                            children=[
                            Shape(
                              appearance=Appearance(
                                material=Material(diffuseColor=(0.1,0.1,0.4))),
                              geometry=IndexedFaceSet(coordIndex=[1,0,2,-1,2,0,3,-1,3,0,4,-1,4,0,5,-1,5,0,1,-1,1,2,7,6,-1,2,3,8,7,-1,3,4,9,8,-1,5,10,9,-1,9,4,5,-1,5,1,6,-1,6,10,5,-1],creaseAngle=3.0,
                                coord=Coordinate(point=[(-2.82282,0.0,8.07176),(0.0,2.66471,4.65658),(-3.44673,3.213,13.04),(-3.44673,-2.8833,13.04),(0.0,-2.66471,4.65658),(0.0,0.0,0.0),(11.7663,3.73,7.76141),(11.7663,3.28613,13.04),(11.7663,-3.28613,13.04),(11.7663,-3.73,7.76141),(11.7663,0.0,6.20965)]))),
                            Transform(rotation=(0.57735,-0.57735,0.57735,-2.09439),
                              children=[
                              Transform(DEF='piede_sin',rotation=(1.0,0.0,0.0,0.0),translation=(0.0,-13.04,11.74),
                                children=[
                                Transform(DEF='piede2_sinistro',rotation=(0.57735,-0.57735,0.57735,2.09439),
                                  children=[
                                  Shape(
                                    appearance=Appearance(
                                      material=Material(diffuseColor=(0.1,0.1,0.4))),
                                    geometry=IndexedFaceSet(coordIndex=[7,8,14,13,-1,10,6,12,16,-1,13,12,6,7,-1,12,13,14,15,16,-1,15,14,8,9,-1,16,15,9,10,-1],creaseAngle=3.0,
                                      coord=Coordinate(point=[(0.0,0.0,0.0),(-0.1336,0.0,-0.918231),(0.0,-1.4263,-0.4),(0.0,0.0,0.0),(-0.426383,-0.0456987,-0.903387),(-1.2218,0.333,-0.1336),(0.0273,3.73,-5.26816),(0.0273,3.28613,0.010432),(0.0273,-3.28613,0.010432),(0.0273,-3.73,-5.26816),(0.0273,0.0,-6.81992),(0.6644,-0.1336,-1.2218),(7.20118,2.76803,-3.61711),(7.20118,2.47356,0.010432),(7.20118,-2.50096,0.010432),(7.20118,-2.75649,-3.52969),(7.20118,0.0,-4.73182)])))])])])])])])])])])])])])])])])])
)

### X3D model conversion complete ###

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

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